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