added the use of dictionary
This commit is contained in:
parent
e26d5d3101
commit
0540b3de6e
4 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class dectalkCommand extends Command {
|
class dectalkCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -23,6 +24,7 @@ class dectalkCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
args.decMessage = rand.random(args.decMessage, message);
|
||||||
args.decMessage = args.decMessage.replace('\n', ' ');
|
args.decMessage = args.decMessage.replace('\n', ' ');
|
||||||
args.decMessage = encodeURI(args.decMessage);
|
args.decMessage = encodeURI(args.decMessage);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class dectalkvcCommand extends Command {
|
class dectalkvcCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -23,6 +24,7 @@ class dectalkvcCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
args.decMessage = rand.random(args.decMessage, message);
|
||||||
args.decMessage = args.decMessage.replace('\n', ' ');
|
args.decMessage = args.decMessage.replace('\n', ' ');
|
||||||
args.decMessage = encodeURI(args.decMessage);
|
args.decMessage = encodeURI(args.decMessage);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class samCommand extends Command {
|
class samCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -23,6 +24,7 @@ class samCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
args.samMessage = rand.random(args.samMessage, message);
|
||||||
let pitch = '';
|
let pitch = '';
|
||||||
if (args.samMessage.includes('[pitch:')) {
|
if (args.samMessage.includes('[pitch:')) {
|
||||||
pitch = args.samMessage.split(/(\[pitch:.*?])/);
|
pitch = args.samMessage.split(/(\[pitch:.*?])/);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class samvcCommand extends Command {
|
class samvcCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -23,6 +24,7 @@ class samvcCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
args.samMessage = rand.random(args.samMessage, message);
|
||||||
let pitch = '';
|
let pitch = '';
|
||||||
if (args.samMessage.includes('[pitch:')) {
|
if (args.samMessage.includes('[pitch:')) {
|
||||||
pitch = args.samMessage.split(/(\[pitch:.*?])/);
|
pitch = args.samMessage.split(/(\[pitch:.*?])/);
|
||||||
|
|
Loading…
Reference in a new issue