-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource
More file actions
59 lines (52 loc) · 2.94 KB
/
source
File metadata and controls
59 lines (52 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const express = require('express');
const app = express();
const port = 3000;
const Database = require("@replit/database")
app.get('/', (req, res) => res.send('~~ GamerBot Terms Of Use ~~ Please dont steal the code or anything! If you get a premium code or something like that DONT SHARE THE LINK! ~~ GamerBot Privacy Policy ~~ We dont store any of your personal data! And the bot is open source so you can get the open source at creators official page.-By Alexplayrus1 Year: 2021, hope you enjoy! Application for submitting premium codes is coming soon. Try it out, its currently in beta: https://discord.com/api/oauth2/authorize?client_id=857509606325747732&permissions=8&scope=bot'));
app.get('/secret', (req, res) => res.send('Theres is no secret, https://GamerBot.alexplayrus1.repl.co/givemesecret'));
app.get('/sus', (req, res) => res.send('sussy baka https://GamerBot.alexplayrus1.repl.co/chickennugget'));
app.get('/TOS', (req, res) => res.send('TOS are at the home page please go back.'));
app.get('/givemesecret', (req, res) => res.send('Theres is no secret please stop, https://GamerBot.alexplayrus1.repl.co/givemethefrickinsecret'));
app.get('/givemethefrickinsecret', (req, res) => res.send('ok you should stop bruh'));
app.get('/chickennugget', (req, res) => res.send('among nugget'));
app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`));
// ================= START BOT CODE ===================
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
client.user.setActivity("Say :commands")
});
client.on('message', msg => {
if (msg.content === ':commands') {
msg.reply(':linkforbot - gives you link to add bot to your server, :info - displays credits etc, :ban @victim - bans a specified member, :kick @victim - kicks a specified member (might be buggy)');
}
});
client.on('message', msg => {
if (msg.content === ':linkforbot') {
msg.reply('https://GamerBot.alexplayrus1.repl.co you can also visit our gdev page: http://gdev.renderforestsites.com/');
}
});
client.on('message', msg => {
if (msg.content === ':info') {
msg.reply('Coded in Replit, uses uptimerobot to keep bot 24/7 online, we are still working on it so expect more.');
}
});
client.on('message', async s4dmessage => {
if (String((s4dmessage.content)).includes(String(':ban'))) {
if(s4dmessage.member.hasPermission("BAN_MEMBERS")) {
(s4dmessage.mentions.members.first()).ban();
}
}
});
client.on('message', async s4dmessage => {
if (String((s4dmessage.content)).includes(String(':kick'))) {
if(s4dmessage.member.hasPermission("KICK_MEMBERS")) {
(s4dmessage.mentions.members.first()).kick();
}
}
});
// You really don't want your token here since your repl's code
// is publically available. We'll take advantage of a Repl.it
// feature to hide the token we got earlier.
client.login(process.env.DISCORD_TOKEN);