pull/29/head
Matthew 2020-12-02 00:26:46 -05:00
parent 5dc02ac1b2
commit 2f4a5fe5f9
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 5 additions and 0 deletions

View File

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