Discord.js v14

This commit is contained in:
Dragon Fire
2024-04-07 19:06:19 -04:00
parent 58c81aa912
commit f59826f7ab
272 changed files with 893 additions and 656 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const Font = require('./Font');
const PhoneManager = require('./phone/PhoneManager');
const TimerManager = require('./remind/TimerManager');
const PokemonStore = require('./pokemon/PokemonStore');
const activities = require('../assets/json/activity');
const activities = require('./activity');
const { REPORT_CHANNEL_ID, JOIN_LEAVE_CHANNEL_ID, COMMAND_CHANNEL_ID } = process.env;
module.exports = class XiaoClient extends CommandClient {
+73
View File
@@ -0,0 +1,73 @@
const { ActivityType } = require('discord.js');
const { formatNumber } = require('./util/Util');
module.exports = [
{
text: 'Rune Factory 4',
type: ActivityType.Playing
},
{
text: 'Rune Factory 4 Special',
type: ActivityType.Playing
},
{
text: 'with your heart',
type: ActivityType.Playing
},
{
text: 'you eat pant',
type: ActivityType.Watching
},
{
text: 'anime',
type: ActivityType.Watching
},
{
text: 'over the inn',
type: ActivityType.Watching
},
{
text: 'at the inn',
type: ActivityType.Playing
},
{
text: 'in Selphia',
type: ActivityType.Playing
},
{
text: 'with Amber',
type: ActivityType.Playing
},
{
text: 'with a cardboard box',
type: ActivityType.Playing
},
{
text: 'in the fridge',
type: ActivityType.Playing
},
{
text: 'with a knife',
type: ActivityType.Playing
},
{
text: 'with a murderous cow',
type: ActivityType.Playing
},
{
text: 'with a linter',
type: ActivityType.Playing
},
{
text: (client) => `${formatNumber(client.guilds.cache.size)} servers`,
type: ActivityType.Watching
},
{
text: (client) => `with ${formatNumber(client.registry.commands.size)} commands`,
type: ActivityType.Playing
},
{
text: (client) => `${formatNumber(client.channels.cache.size)} channels`,
type: ActivityType.Watching
}
];
+1 -1
View File
@@ -1,5 +1,5 @@
const { stripIndents } = require('common-tags');
const { Util: { escapeMarkdown } } = require('discord.js');
const { escapeMarkdown } = require('discord.js');
const { reactIfAble } = require('../../util/Util');
const { SUCCESS_EMOJI_ID, FAILURE_EMOJI_ID } = process.env;
+2 -1
View File
@@ -1,4 +1,5 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
module.exports = class AutoReplyCommand extends Command {
constructor(client, info) {
@@ -9,7 +10,7 @@ module.exports = class AutoReplyCommand extends Command {
}
run(msg) {
if (msg.guild && !msg.channel.permissionsFor(this.client.user).has('SEND_MESSAGES')) return null;
if (msg.guild && !msg.channel.permissionsFor(this.client.user).has(PermissionFlagsBits.SendMessages)) return null;
const text = this.generateText();
if (!text) return null;
return this.reply ? msg.reply(text) : msg.say(text);