diff options
| -rw-r--r-- | .dockerignore | 2 | ||||
| -rw-r--r-- | Dockerfile | 13 | ||||
| -rwxr-xr-x | aleebot.js | 60 | ||||
| -rw-r--r-- | docker-compose.yml | 5 |
4 files changed, 77 insertions, 3 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..71f8e34 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +abtoken.json
\ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bfe2eca --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM oven/bun:latest + +WORKDIR /bot + +COPY package.json ./ + +COPY bun.lockb ./ + +RUN bun install + +COPY . . + +ENTRYPOINT ["node", "aleebot.js"] @@ -40,14 +40,68 @@ function botActivity(client) { }); } -client.once('ready', async () => { +client.once('ready', () => { console.log("[SUCCESS] AleeBot is now ready!"); - await botActivity(client); + botActivity(client); + + setInterval(function() { + botActivity(client); + }, 200000); }); client.on('messageCreate', message => { - let args = message.content.split(" ").slice(1); + const args = message.content.slice(`${message.client.user}`.length).trim(); + if (message.mentions.everyone) return; + + if (message.mentions.has(message.client.user)) { + if (!args) { + switch (Math.floor (Math.random() * 1000) % 3) { + case 0: + message.reply('What do you want?'); + break; + case 1: + message.reply('Yes?'); + break; + case 2: + message.reply('What do you want?'); + break; + } + } + + if (args.toLowerCase().includes('hello')) { + return message.reply('How are you doing?') + } + + if (args.toLowerCase().includes('?') || args.toLowerCase().includes('what')) { + switch (Math.floor(Math.random() * 1000) % 3) { + case 0: + message.reply('What are you talking about?'); + break; + case 1: + message.reply('Hmm?'); + break; + case 2: + message.reply('Sausages.'); + break; + } + } + + + if (args.toLowerCase().includes('love') || args.toLowerCase().includes('<3') || args.toLowerCase().includes(':heart:')) { + switch (Math.floor(Math.random() * 1000) % 3) { + case 0: + message.reply('Thank you!'); + break; + case 1: + message.reply('Thanks :)'); + break; + case 2: + message.reply('Aww, thanks!'); + break; + } + } + } if(message.content === prefix + 'profile'){ message.reply(`${message.author.avatarURL()}`); diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e7e6246 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +services: + aleebot: + image: aleebot-apf + volumes: + - ./abtoken.json:/bot/abtoken.json |
