i dont even fucking know anymore man theres like three things going on in this commit
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
config.json
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:latest
|
FROM node:25
|
||||||
RUN mkdir -p /usr/scr/bot
|
RUN mkdir -p /usr/scr/bot
|
||||||
WORKDIR /usr/src/bot
|
WORKDIR /usr/src/bot
|
||||||
COPY . /usr/src/bot
|
COPY . /usr/src/bot
|
||||||
|
|||||||
8
config.json.default
Normal file
8
config.json.default
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"token": "bot token go here",
|
||||||
|
"status": "looking for x.com links",
|
||||||
|
"parentsAndOrGuardians": [
|
||||||
|
"230659159450845195",
|
||||||
|
"297983197990354944"
|
||||||
|
]
|
||||||
|
}
|
||||||
23
index.js
23
index.js
@@ -1,5 +1,4 @@
|
|||||||
const token = process.env.DISCORD_TOKEN
|
const config = require('./config.json');
|
||||||
|
|
||||||
// the basic discord setup stuff yoinked from their guide
|
// the basic discord setup stuff yoinked from their guide
|
||||||
const { Client, Events, GatewayIntentBits, Partials, ActivityType, MessageFlags } = require('discord.js');
|
const { Client, Events, GatewayIntentBits, Partials, ActivityType, MessageFlags } = require('discord.js');
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
@@ -15,14 +14,13 @@ const client = new Client({
|
|||||||
Partials.Message,
|
Partials.Message,
|
||||||
Partials.Reaction,
|
Partials.Reaction,
|
||||||
Partials.User
|
Partials.User
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
client.once(Events.ClientReady, readyClient => {
|
client.once(Events.ClientReady, readyClient => {
|
||||||
console.log(`Discord: Connected as ${readyClient.user.tag}`);
|
console.log(`Discord: Connected as ${readyClient.user.tag}`);
|
||||||
client.user.setActivity('for x.com links', { type: ActivityType.Watching });
|
client.user.setActivity(config.status, { type: ActivityType.Custom });
|
||||||
});
|
});
|
||||||
client.login(token);
|
client.login(config.token);
|
||||||
|
|
||||||
|
|
||||||
client.on(Events.MessageCreate, message => {
|
client.on(Events.MessageCreate, message => {
|
||||||
// if we smell a twitter link, girlcock it!
|
// if we smell a twitter link, girlcock it!
|
||||||
@@ -41,9 +39,8 @@ client.on(Events.MessageCreate, message => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// hehe an eval :3 yeah im hardcoding myself
|
// hehe an eval :3
|
||||||
const peopleWhoCanFunnyEval = ['230659159450845195', '297983197990354944']
|
if (message.content.startsWith('!eval') && config.parentsAndOrGuardians.includes(message.author.id)) {
|
||||||
if (message.content.startsWith('!eval') && peopleWhoCanFunnyEval.includes(message.author.id)) {
|
|
||||||
let code = message.content.substring('!eval'.length).trim();
|
let code = message.content.substring('!eval'.length).trim();
|
||||||
|
|
||||||
// yeah a machine may have wrote this part
|
// yeah a machine may have wrote this part
|
||||||
@@ -60,6 +57,12 @@ client.on(Events.MessageCreate, message => {
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// hehe we do a little if stacking
|
||||||
|
if (message.content.startsWith('!status') && config.parentsAndOrGuardians.includes(message.author.id)) {
|
||||||
|
let status = message.content.substring('!status'.length).trim();
|
||||||
|
client.user.setActivity(status, { type: ActivityType.Custom });
|
||||||
|
config.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
// wouldnt it be funny to react to 1 in like 10000 messages with emoji from a list
|
// wouldnt it be funny to react to 1 in like 10000 messages with emoji from a list
|
||||||
if (Math.random() < 0.0001 && !message.author.bot) {
|
if (Math.random() < 0.0001 && !message.author.bot) {
|
||||||
|
|||||||
Reference in New Issue
Block a user