mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 07:53:20 +00:00
Rename devId to devIds in config
This commit is contained in:
parent
97881f7331
commit
bc238d919d
@ -28,7 +28,6 @@ export default class RadioClient extends Client {
|
|||||||
public streamer: Streamer | null;
|
public streamer: Streamer | null;
|
||||||
public statistics: Statistics | null;
|
public statistics: Statistics | null;
|
||||||
public radio: Radio | null;
|
public radio: Radio | null;
|
||||||
public developers: string | undefined;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
|
@ -13,7 +13,7 @@ export default {
|
|||||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
||||||
let message: any = {};
|
let message: any = {};
|
||||||
|
|
||||||
if(!client.funcs.isDev(client.config.devId, interaction.user.id)) return interaction.reply({
|
if(!client.funcs.isDev(client.config.devIDs, interaction.user.id)) return interaction.reply({
|
||||||
content: client.messages.emojis["error"] + client.messages.notAllowed,
|
content: client.messages.emojis["error"] + client.messages.notAllowed,
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
});
|
});
|
||||||
|
@ -20,17 +20,11 @@ export default async function ready(client: RadioClient) {
|
|||||||
client.funcs.logger('Datastore', 'Ready');
|
client.funcs.logger('Datastore', 'Ready');
|
||||||
|
|
||||||
/*DEVELOPERS*/
|
/*DEVELOPERS*/
|
||||||
client.developers = "";
|
let developers : string[] = [];
|
||||||
let user : any= "";
|
for(let devID of client.config.devIDs){
|
||||||
for (let i = 0; i < client.config.devId.length; i++) {
|
developers.push((await client.users.fetch(devID)).tag);
|
||||||
user = await client.users.fetch(client.config.devId[i]);
|
|
||||||
client.funcs.logger('Developers', user.tag);
|
|
||||||
if (i == client.config.devId.length - 1) {
|
|
||||||
client.developers += user.tag;
|
|
||||||
} else {
|
|
||||||
client.developers += user.tag + " & ";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
client.funcs.logger('Developers', developers.join(" & "));
|
||||||
|
|
||||||
/*STATIONS*/
|
/*STATIONS*/
|
||||||
client.stations = new Stations();
|
client.stations = new Stations();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
export default function isDev(devList : any, authorID : any){
|
import { Snowflake } from "discord.js";
|
||||||
|
|
||||||
|
export default function isDev(devIDs : any[], authorID : Snowflake){
|
||||||
let response = false;
|
let response = false;
|
||||||
Object.keys(devList).forEach(function(oneDev) {
|
for (const devID of devIDs){
|
||||||
let devID = devList[oneDev];
|
|
||||||
if(authorID == devID){
|
if(authorID == devID){
|
||||||
response = true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ export default {
|
|||||||
|
|
||||||
//support
|
//support
|
||||||
supportGuild: "https://discord.gg/rRA65Mn",
|
supportGuild: "https://discord.gg/rRA65Mn",
|
||||||
devId: [
|
devIDs: [
|
||||||
"493174343484833802",
|
"493174343484833802",
|
||||||
"360363051792203779"
|
"360363051792203779"
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user