Delay presence change

master
michael 2020-07-22 08:04:06 -07:00
parent 20dca04361
commit abebd84871
1 changed files with 7 additions and 3 deletions

10
bot.py
View File

@ -1,4 +1,4 @@
""" r"""
_____ __ _____ __
/ ___/__ __ _ _______ ____/ /__ / ___/__ __ _ _______ ____/ /__
/ /__/ _ \/ ' \/ __/ _ `/ _ / -_) / /__/ _ \/ ' \/ __/ _ `/ _ / -_)
@ -83,11 +83,13 @@ class TopGG(commands.Cog):
@bot.event @bot.event
async def on_ready(): async def on_ready():
# await bot.change_presence(activity=discord.Game(name='{} servers | >>help'.format(len(bot.guilds)))) # await bot.change_presence(activity=discord.Game(name='{} servers | >>help'.format(len(bot.guilds))))
bot.loop.create_task(status_loop())
bot.add_cog(TopGG(bot)) bot.add_cog(TopGG(bot))
print("Bot started.") print("Bot started.")
print("--------------------------") print("--------------------------")
await asyncio.sleep(300)
bot.loop.create_task(status_loop())
@bot.command(aliases=['manual', 'commands', 'info']) @bot.command(aliases=['manual', 'commands', 'info'])
async def help(ctx): async def help(ctx):
embed = discord.Embed(title="Comrade: Usage & Other Info") embed = discord.Embed(title="Comrade: Usage & Other Info")
@ -252,6 +254,7 @@ async def mute(ctx, target_user:discord.User):
muted_users.remove(target_user) muted_users.remove(target_user)
except discord.ext.commands.errors.CommandInvokeError: except discord.ext.commands.errors.CommandInvokeError:
await error_admin_targeted(ctx) await error_admin_targeted(ctx)
muted_users.remove(target_user)
@bot.command() @bot.command()
async def kick(ctx, target_user:discord.User): async def kick(ctx, target_user:discord.User):
@ -270,6 +273,7 @@ async def kick(ctx, target_user:discord.User):
if vote_passed: if vote_passed:
try: try:
await ctx.guild.kick(target_user) await ctx.guild.kick(target_user)
await ctx.send("👢 Kicked `{}`.".format(target_user))
except discord.ext.commands.errors.CommandInvokeError: except discord.ext.commands.errors.CommandInvokeError:
await error_admin_targeted(ctx) await error_admin_targeted(ctx)
@ -293,7 +297,7 @@ async def ban(ctx, target_user:discord.User):
if vote_passed: if vote_passed:
try: try:
await ctx.guild.ban(target_user) await ctx.guild.ban(target_user)
await ctx.send(":crab: :crab: `{}` IS GONE :crab: :crab:".format(target_user.name)) await ctx.send("🦀🦀 `{}` IS GONE 🦀🦀".format(target_user.name))
except discord.ext.commands.errors.CommandInvokeError: except discord.ext.commands.errors.CommandInvokeError:
await error_admin_targeted(ctx) await error_admin_targeted(ctx)