mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-03 03:04:28 +00:00
Typescript Continue
This commit is contained in:
@ -3,7 +3,7 @@ import RadioClient from "../../Client";
|
||||
export default {
|
||||
name: 'SIGINT',
|
||||
execute(client: RadioClient) {
|
||||
client.user.setStatus('dnd');
|
||||
client.user?.setStatus('dnd');
|
||||
|
||||
client.streamer?.leave(client);
|
||||
client.radio?.save(client);
|
||||
|
@ -5,6 +5,13 @@ export default {
|
||||
name: 'interactionCreate',
|
||||
async execute(client: RadioClient, interaction: any) {
|
||||
|
||||
if(client.config.maintenanceMode){
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.maintenance,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
|
||||
const permissions = interaction.channel.permissionsFor(interaction.client.user);
|
||||
if (!permissions.has(PermissionFlagsBits.ViewChannel)) return;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Message } from "discord.js";
|
||||
import { Message, PartialMessage } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
|
||||
export default {
|
||||
name: 'messageDelete',
|
||||
async execute(client: RadioClient, msg: Message) {
|
||||
if(!msg.author.bot || !msg.guild) return;
|
||||
async execute(client: RadioClient, msg: Message | PartialMessage) {
|
||||
if(!msg.author?.bot || !msg.guild) return;
|
||||
const radio = client.radio?.get(msg.guild.id);
|
||||
if(!radio) return;
|
||||
if(!radio.message) return;
|
||||
|
@ -4,7 +4,7 @@ import Radio from "../classes/Radio";
|
||||
import Stations from "../classes/Stations";
|
||||
import Streamer from "../classes/Streamer";
|
||||
import Statistics from "../classes/Statistics";
|
||||
import emojis from "../emojis"
|
||||
import { emojis } from "../emojis"
|
||||
import commands from "../commands";
|
||||
|
||||
export default {
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
client.streamer.init(client);
|
||||
|
||||
if(!client.stations) {
|
||||
client.user.setStatus('dnd');
|
||||
client.user?.setStatus('dnd');
|
||||
}
|
||||
|
||||
/*GUILDS*/
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
|
||||
setTimeout(function () {
|
||||
/*RESTORE RADIOS*/
|
||||
client.radio.restore(client, guilds);
|
||||
client.radio?.restore(client, guilds);
|
||||
}, 5000);
|
||||
|
||||
setTimeout(function () {
|
||||
|
@ -13,7 +13,7 @@ export default {
|
||||
const radio = client.radio?.get(newState.guild.id);
|
||||
if (!radio) return;
|
||||
|
||||
if (newState.member?.id === client.user.id && oldState.member?.id === client.user.id) {
|
||||
if (newState.member?.id === client.user?.id && oldState.member?.id === client.user?.id) {
|
||||
|
||||
if (newState.channel === null) {
|
||||
client.statistics?.update(client, newState.guild, radio);
|
||||
|
Reference in New Issue
Block a user