From b9e0d7fe0292650c50f6f6b941e06f9f7edea140 Mon Sep 17 00:00:00 2001 From: clpsclps <87051748+clpsclps@users.noreply.github.com> Date: Sun, 14 Nov 2021 12:49:11 +0800 Subject: [PATCH] v1.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 初始提交 --- discord.js | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ start.bat | 1 + 2 files changed, 75 insertions(+) create mode 100644 discord.js create mode 100644 start.bat diff --git a/discord.js b/discord.js new file mode 100644 index 0000000..10203ac --- /dev/null +++ b/discord.js @@ -0,0 +1,74 @@ +const Discord = require('discord.js'); +const { token } = require('./token.json'); +const client = new Discord.Client(); + + +client.on('ready', () => { + console.log(`Logged in as ${client.user.tag}!`); + console.log('bot status', client.user.presence.status); + console.log('bot is start now'); + console.log('if you want to stop bot , please close this window :)'); + client.user.setActivity("輸入 a#help 取得幫助 V1.1"); + + +}); + +client.on('message', msg => { + + if (msg.content === '@everyone') { + + msg.channel.send('@everyone'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'a#help') { + + msg.channel.send('請輸入a#anti開始炸服,邀請連結請輸入a#inv,指令列表請輸入a#com(如因使用此炸群機器人造成他人的損失/麻煩, 我們將恕不負責。)'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'a#anti') { + + msg.channel.send('@everyone'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'ping') { + + msg.channel.send('pong🏓'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'yee') { + + msg.channel.send('yee'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'a#inv') { + + msg.channel.send('目前不開放邀請連結'); + } +}); + +client.on('message', msg => { + + if (msg.content === 'a#com') { + + msg.channel.send('網頁製作中'); + } +}); + + + +client.login(token); \ No newline at end of file diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..565348d --- /dev/null +++ b/start.bat @@ -0,0 +1 @@ +node discord.js \ No newline at end of file