mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
fixed an issue.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
NODE_ENV=production
|
||||
|
||||
DATABASE_URL=
|
||||
DEV_GUILD=
|
||||
DISCORD_TOKEN=
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"start": "node dist/index.js",
|
||||
"start": "NODE_ENV=production node dist/index.js",
|
||||
"build": "esbuild 'src/**/*.ts' --platform=node --format=cjs --outdir=dist"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"identifiers": {
|
||||
"emojiId": "448912932340891670",
|
||||
"targetId": "147433323503943680"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
identifiers: {
|
||||
emojiId: "448912932340891670",
|
||||
targetId: "1363132678022631428"
|
||||
}
|
||||
}
|
||||
+3
-8
@@ -1,17 +1,12 @@
|
||||
// Client.
|
||||
import ready from "./client/ready";
|
||||
|
||||
// Message.
|
||||
import messageReactionAdd from "./message/messageReactionAdd";
|
||||
import messageReactionRemove from "./message/messageReactionRemove";
|
||||
import ready from "./client/ready";
|
||||
|
||||
// ----------
|
||||
|
||||
export default [
|
||||
// Client.
|
||||
ready,
|
||||
|
||||
// Message.
|
||||
messageReactionAdd,
|
||||
messageReactionRemove
|
||||
messageReactionRemove,
|
||||
ready,
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CommandClient, Constants, Event, Member, Message } from "athena-prime";
|
||||
import config from '../../config.json';
|
||||
import config from '../../config';
|
||||
|
||||
// ----------
|
||||
|
||||
@@ -10,7 +10,7 @@ class MessageReactionAddEvent extends Event<CommandClient> {
|
||||
const msg = await context.getMessage(message.channel.id, message.id);
|
||||
if (msg.author.id !== config.identifiers.targetId || emoji.id !== config.identifiers.emojiId) return;
|
||||
|
||||
console.log(`[MESSAGE_REACTION_ADD] - Points: ${member.username} (ID: ${member.id})`);
|
||||
console.log(`[MESSAGE_REACTION_ADD] - ID: ${member.id}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { CommandClient, Constants, Event, Member, Message } from "athena-prime";
|
||||
import config from '../../config.json';
|
||||
import config from '../../config';
|
||||
|
||||
// ----------
|
||||
|
||||
class MessageReactionRemoveEvent extends Event<CommandClient> {
|
||||
event: string = 'messageReactionRemove' as const;
|
||||
|
||||
async handle(context: CommandClient<any, any>, message: Message, emoji: Constants.APIEmoji, member: Member) {
|
||||
async handle(context: CommandClient<any, any>, message: { id: string, channel: { id: string }}, emoji: Constants.APIEmoji, user: string) {
|
||||
const msg = await context.getMessage(message.channel.id, message.id);
|
||||
if (msg.author.id !== config.identifiers.targetId || emoji.id !== config.identifiers.emojiId) return;
|
||||
|
||||
console.log(`[MESSAGE_REACTION_REMOVE] - Points: ${member.username} (ID: ${member.id})`);
|
||||
console.log(`[MESSAGE_REACTION_REMOVE] - ID: ${user}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -1,3 +1,5 @@
|
||||
import 'dotenv/config';
|
||||
|
||||
import { CommandClient, Constants, Guild, Member, Message, NullCollection, User } from 'athena-prime';
|
||||
import events from './events';
|
||||
|
||||
@@ -11,7 +13,7 @@ const client: CommandClient = new CommandClient({
|
||||
Constants.GatewayIntentBits.Guilds,
|
||||
Constants.GatewayIntentBits.GuildMembers,
|
||||
Constants.GatewayIntentBits.GuildMessages,
|
||||
Constants.GatewayIntentBits.MessageContent
|
||||
Constants.GatewayIntentBits.GuildMessageReactions
|
||||
],
|
||||
|
||||
largeBotOptimizations: true,
|
||||
@@ -21,8 +23,8 @@ const client: CommandClient = new CommandClient({
|
||||
members: () => new NullCollection(Member),
|
||||
messages: () => new NullCollection(Message),
|
||||
guilds: () => new NullCollection(Guild)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
events.forEach(event => client.registerEvent(event));
|
||||
|
||||
Vendored
-1
@@ -4,7 +4,6 @@ declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
DATABASE_URL: string;
|
||||
DEV_GUILD: string;
|
||||
DISCORD_TOKEN: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user