diff --git a/src/class/Util.ts b/src/class/Util.ts index b54a386..85d1c88 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -3,6 +3,7 @@ import nodemailer from 'nodemailer'; import GoogleTTS, { TextToSpeechClient } from '@google-cloud/text-to-speech'; import childProcess from 'child_process'; import ARIClient from 'ari-client'; +import AMIClient from 'asterisk-manager'; import signale from 'signale'; import { Member, Message, Guild, PrivateChannel, GroupChannel, Role, AnyGuildChannel, WebhookPayload } from 'eris'; import { Client, Command, Moderation, PBX, RichEmbed } from '.'; @@ -21,6 +22,8 @@ export default class Util { public ari: ARIClient.Client; + public ami: any; + public tts: TextToSpeechClient; constructor(client: Client) { @@ -45,6 +48,8 @@ export default class Util { this.ari = await ARIClient.connect('http://10.8.0.1:8088/ari', 'cr0', this.client.config.ariClientKey); this.ari.start(['cr-zero', 'page-dtmf']); + this.ami = new AMIClient(5038, '10.8.0.1', this.client.config.amiClientKey); + process.env.GOOGLE_APPLICATION_CREDENTIALS = `${__dirname}/../../google.json`; this.tts = new GoogleTTS.TextToSpeechClient();