-
Notifications
You must be signed in to change notification settings - Fork 1
/
bump.py
78 lines (59 loc) · 2.4 KB
/
bump.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import asyncio
import discord
from discord.ext import commands
client = commands.Bot(description='Discord Auto Bumper!', command_prefix="p.")#prefix is changeable. Make it so no one will ever guess it. (unless they see you use it then it's kinda meh.
TOKEN = 'YOUR_TOKEN_HERE'
@client.command(pass_context=True)
async def ping(ctx):
if ctx.author.id == your_main_account_id_here:
await ctx.send(f"pong! connection speed is {round(client.latency * 1000)}ms")
else:
pass
# """Starts the timer to bump every 2 hrs and 1 min because sometimes the disboard bot gives an error and tells you to wait 1 more min."""
@client.command(pass_context=True)
async def bump(ctx):
if ctx.author.id == your_main_account_id_here:
while 1:
bumpy = 0
bumpy = bumpy + 1
try:
print("Processing new bump!")
await ctx.send('!d bump')
await asyncio.sleep(7260)
print(f"Bump {bumpy} succesfully bumped the server with disboard!")
except:
print(f"Couldn't Process bump :( {bumpy}.")
else:
pass
# """Starts the timer to bump every 40 mins"""
#It's set to 40 min because I have a channel for DSC to post other servers in, which in return allows you to bump faster. Otherwise it's 2hrs. 7200s = 2hrs.
@client.command(pass_context=True)
async def dsc(ctx):
if ctx.author.id == your_main_account_id_here:
while 1:
dscB = 0
dscB = dscB + 1
try:
print("Processing DSC bump!")
await ctx.send('d=bump')
await asyncio.sleep(2400)
print(f"Bump {dscB} succesfully bumped the server using DSC!")
except:
print(f"Couldn't Process bump :( {dscB}.")
else:
pass
#Counts the message/command you send as part of how many to want to delete. Example: p.purge 8 to purge 7 messages from the channel, because it counts your command as 1.
@client.command(pass_context=True)
async def purge(ctx, amount=7):
if ctx.author.id == your_main_account_id_here:
await ctx.channel.purge(limit=amount+1)
else:
pass
@client.event
async def on_ready():
await client.change_presence(activity=discord.Game(name=f"Doing teh bumps"), status=discord.Status.online)
print("User Online!")
print(client.user.name)
print(client.user.id)
print('------')
client.run(TOKEN, bot=False)