mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 20:23:16 +00:00
Updated commands and interactionCreate event
This commit is contained in:
parent
16bc2aab52
commit
2d41c7a76b
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'bug',
|
||||
description: 'Report a bug',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client, Discord, command) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
message.bugTitle = client.messages.bugTitle.replace("%client.user.username%", client.user.username);
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
description: 'Get help using bot',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(interaction, client, Discord, command) {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
const categories = [];
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'invite',
|
||||
description: 'Invite Bot',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(interaction, client, Discord, command) {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
message.inviteTitle = client.messages.inviteTitle.replace("%client.user.username%", client.user.username);
|
||||
const embed = new Discord.MessageEmbed()
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
description: 'List radio stations',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
execute(interaction, client, Discord) {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'maintenance',
|
||||
description: 'Bot Maintenance',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(interaction, client, Discord, command) {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
if(!client.funcs.isDev(client.config.devId, interaction.user.id)) return interaction.reply(client.messageEmojis["error"] + client.messages.notAllowed);
|
||||
|
@ -3,7 +3,7 @@ module.exports = {
|
||||
description: 'Next Station',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client, Discord) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply({
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'nowplaying',
|
||||
description: 'Current Radio Station',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
async execute(interaction, client, Discord) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply({
|
||||
|
@ -13,7 +13,7 @@ module.exports = {
|
||||
],
|
||||
permission: "none",
|
||||
category: "radio",
|
||||
async execute(interaction, client, Discord, command) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
let query = interaction.options?.getString("query") ?? interaction.values?.[0];
|
||||
if(!query){
|
||||
|
@ -3,7 +3,7 @@ module.exports = {
|
||||
description: 'Previous Station',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client, Discord) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply({
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'statistics',
|
||||
description: 'Show statistics',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(interaction, client, Discord) {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
let stations = client.stations;
|
||||
let currentGuild = client.datastore.getEntry(interaction.guild.id);
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'status',
|
||||
description: 'Bot Status',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client, Discord) {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username);
|
||||
|
@ -1,9 +1,11 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'stop',
|
||||
description: 'Stop radio',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
async execute(interaction, client, Discord) {
|
||||
async execute(interaction, client) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
|
@ -1,5 +1,3 @@
|
||||
import Discord from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
name: 'interactionCreate',
|
||||
async execute(client, interaction) {
|
||||
@ -13,7 +11,7 @@ module.exports = {
|
||||
if (!command) return;
|
||||
|
||||
try {
|
||||
command.execute(interaction, client, Discord);
|
||||
command.execute(interaction, client);
|
||||
} catch (error) {
|
||||
interaction.reply({
|
||||
content: client.messages.runningCommandFailed,
|
||||
@ -27,7 +25,7 @@ module.exports = {
|
||||
if (!command) return;
|
||||
|
||||
try {
|
||||
command.execute(interaction, client, Discord);
|
||||
command.execute(interaction, client);
|
||||
} catch (error) {
|
||||
interaction.reply({
|
||||
content: client.messages.runningCommandFailed,
|
||||
|
Loading…
Reference in New Issue
Block a user