Last active
October 11, 2018 20:46
-
-
Save infideleraser/dcfbc68955acaf2a6e3f29fd3416beb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jackson = 332226392567578635 | |
sentinel = 0 | |
bot = commands.Bot( | |
description="A bot created by Infidel Eraser#5265 for fun." | |
' It contains meme commands and it even has a useful few tools.' | |
' The prefix is "shrek" or mention the bot', | |
command_prefix=commands.when_mentioned_or("shrek ") | |
) | |
@bot.event | |
while sentinel == 0: | |
await bot.change_presence(activity=discord.Activity(type=2, name=f'{len(bot.users)} users')) | |
await asyncio.sleep(20) | |
await bot.change_presence(activity=discord.Activity(type=0, name=f"use 'shrek help' for commands")) | |
await asyncio.sleep(15) | |
await bot.change_presence(activity=discord.Activity(type=3, name=f'{len(bot.guilds)} servers')) | |
await asyncio.sleep(30) | |
@bot.command() | |
async def status(ctx, statushit): | |
"""changes status of bot (idle, online, dnd, inv)""" | |
if ctx.author.id == jackson: | |
if statushit == "idle": | |
sentinel = 1 | |
await ctx.send("Status changed") | |
while sentinel == 1: | |
await bot.change_presence(status=discord.Status.idle, activity=discord.Activity(type=2, name=f'{len(bot.users)} users')) | |
await asyncio.sleep(20) | |
await bot.change_presence(status=discord.Status.idle, activity=discord.Activity(type=0, name=f"use 'shrek help' for commands")) | |
await asyncio.sleep(15) | |
await bot.change_presence(status=discord.Status.idle, activity=discord.Activity(type=3, name=f'{len(bot.guilds)} servers')) | |
await asyncio.sleep(30) | |
if statushit == "dnd": | |
sentinel = 2 | |
await ctx.send("Status changed") | |
while sentinel == 2: | |
await bot.change_presence(status=discord.Status.dnd, activity=discord.Activity(type=2, name=f'{len(bot.users)} users')) | |
await asyncio.sleep(20) | |
await bot.change_presence(status=discord.Status.dnd, activity=discord.Activity(type=0, name=f"use 'shrek help' for commands")) | |
await asyncio.sleep(15) | |
await bot.change_presence(status=discord.Status.dnd, activity=discord.Activity(type=3, name=f'{len(bot.guilds)} servers')) | |
await asyncio.sleep(30) | |
if statushit == "inv": | |
sentinel = 3 | |
await ctx.send("Status changed") | |
while sentinel == 3: | |
await bot.change_presence(status=discord.Status.offline, activity=discord.Activity(type=2, name=f'{len(bot.users)} users')) | |
await asyncio.sleep(20) | |
await bot.change_presence(status=discord.Status.offline, activity=discord.Activity(type=0, name=f"use 'shrek help' for commands")) | |
await asyncio.sleep(15) | |
await bot.change_presence(status=discord.Status.offline, activity=discord.Activity(type=3, name=f'{len(bot.guilds)} servers')) | |
await asyncio.sleep(30) | |
if statushit == 'online': | |
sentinel = 4 | |
await ctx.send("Status changed") | |
while sentinel == 4: | |
await bot.change_presence(activity=discord.Activity(type=2, name=f'{len(bot.users)} users')) | |
await asyncio.sleep(20) | |
await bot.change_presence(activity=discord.Activity(type=0, name=f"use 'shrek help' for commands")) | |
await asyncio.sleep(15) | |
await bot.change_presence(activity=discord.Activity(type=3, name=f'{len(bot.guilds)} servers')) | |
await asyncio.sleep(30) | |
if statushit not in ("online" ,"idle" , "inv", "dnd"): | |
await ctx.send(f'"{statushit}" is not a valid parameter. The valid parameters are "online, inv, dnd, idle"') | |
else: | |
await ctx.send("you cant do this boi") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment