From 909a6c1faa7859d99f85d60621bd7b6c07627b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sun, 20 Mar 2022 07:41:09 +0000 Subject: [PATCH] Update 'bot.py' --- bot.py | 64 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/bot.py b/bot.py index 5e9a302..2630857 100755 --- a/bot.py +++ b/bot.py @@ -1,32 +1,32 @@ -def write_pid(): - pid = os.getpid() - with open('/tmp/spam.pid', 'w') as f: - f.write(str(pid)) - print('Hello my(i \'m spambot) pid is ' + str(pid)) -write_pid() - -from discord.ext import commands -import asyncio - -client = commands.Bot(command_prefix="$") - - -@client.event -async def on_ready(): - print("Potato is ready.") - - -@client.command(help='(what to spam) (interval(sec)) (how many times spam)') -@commands.has_permissions(administrator=True) -async def spamhere(ctx, what, interval, times): - try: - for i in range(int(times)): - await ctx.send(what) - await asyncio.sleep(int(interval)) - except Exception as e: - await ctx.send(e) - - -with open("/home/git/spam_key") as tkn: - client.run(tkn.read()) - +def write_pid(): + pid = os.getpid() + with open('/tmp/spam.pid', 'w') as f: + f.write(str(pid)) + print('Hello my(i \'m spambot) pid is ' + str(pid)) +write_pid() + +from discord.ext import commands +import asyncio + +client = commands.Bot(command_prefix="$") + + +@client.event +async def on_ready(): + print("Potato is ready.") + + +@client.command(help='(what to spam) (interval(sec)) (how many times spam)') +@commands.has_permissions(administrator=True) +async def spamhere(ctx, what, interval, times): + try: + for i in range(int(times)): + await ctx.send(what) + await asyncio.sleep(int(interval)) + except Exception as e: + await ctx.send(e) + + +with open("/home/spambot/spam_key") as tkn: + client.run(tkn.read()) +