106 lines
4.0 KiB
Python
106 lines
4.0 KiB
Python
import json
|
|
import discord
|
|
import time
|
|
import requests
|
|
from discord.ext import commands
|
|
|
|
## Xeno Discord PY Bot
|
|
### Stupid fun commands
|
|
|
|
if __name__ == "__main__":
|
|
print("This is a cog (addon) for the Xeno Discord bot. This file cannot be run standalone.")
|
|
exit()
|
|
|
|
class FunCmds(commands.Cog):
|
|
def __init__(self, bot):
|
|
self.bot = bot
|
|
|
|
@commands.command(name='ass', pass_context=True)
|
|
async def ass(self, ctx):
|
|
await ctx.send(f'It\'s time to chew ass and kick gum.')
|
|
time.sleep(1)
|
|
await ctx.send(f'And I\'m all out of ass.')
|
|
|
|
@commands.command(name='boob', pass_context=True)
|
|
async def boob(self, ctx):
|
|
await ctx.send(f'boob transformed is poop and it doesn\'t come out of it')
|
|
|
|
@commands.command(name='i!')
|
|
async def prefix1(self, ctx):
|
|
await ctx.send(f'That\'s more than expected...')
|
|
|
|
@commands.command(name='i!i!')
|
|
async def prefix2(self, ctx):
|
|
await ctx.send(f'wot you want bruh')
|
|
|
|
@commands.command(name='i!i!i!')
|
|
async def prefix3(self, ctx):
|
|
await ctx.send(f'Yeeeeeeeeeeeees?')
|
|
|
|
@commands.command(name='i!i!i!i!')
|
|
async def prefix4(self, ctx):
|
|
await ctx.send(f'Partner that\'s a bit too much, you\'re goin to the Principal\'s Office:tm:.')
|
|
|
|
@commands.command(name='longping')
|
|
async def longping(self, ctx):
|
|
await ctx.send(f'This is the first message, if you see another after 5 seconds Bozos isn\'t being an asshole and the bot is working')
|
|
time.sleep(5)
|
|
await ctx.send(f'If you see this message, 5 seconds have passed')
|
|
|
|
@commands.command(name='pigeon')
|
|
async def pigeon(self, ctx):
|
|
await ctx.send(f'I HAV ESCAPED FROM TEH POLICE')
|
|
time.sleep(0.5)
|
|
await ctx.send(f'THIS IS MY NEW HOME')
|
|
time.sleep(0.5)
|
|
await ctx.send(f'WITH DA PIGEON')
|
|
time.sleep(0.5)
|
|
await ctx.send(f'HELO PIGEON')
|
|
time.sleep(0.5)
|
|
await ctx.send(f'EHH')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'EHH')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'EHH')
|
|
|
|
@commands.command(name='starwars')
|
|
async def starwars(self, ctx):
|
|
await ctx.send(f'**DUUUUUUUUUUUUUUUUN**')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'DUN DUN *DUUUUUUUUUUUUUN*')
|
|
await ctx.send(f'DUNDUNDUDNDUNDUDNUDNDNUDNDUNU**DNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN**')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'DUN DUN DUN **DUUUUUUUUUUUUUUUUUUUUUUUUN** DUN DUND UDNDUNDUN*DNNNNNNNNNNNNNNNNNNNN*')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'DUN DUND UDNDUNDUN*DNNNNNNNNNNNNNNNNNNNN*')
|
|
time.sleep(0.2)
|
|
await ctx.send(f'DUN DUND UDNDUNDUN**DNNNNNNNNNNNNNNNNNNNN**')
|
|
time.sleep(0.4)
|
|
await ctx.send(f'BOM BOM BOM *BAUUUUMMMM*')
|
|
await ctx.send(f'ok das it lmao hahah mr sunglasses ok no yas')
|
|
|
|
@commands.command(name='urban')
|
|
async def urban(self, ctx, arg):
|
|
urbanrq = requests.get(f'http://api.urbandictionary.com/v0/define?term={arg}')
|
|
# urbanjson = urbanrq.json() if urbanrq.status_code == 200 else None
|
|
urbanjson = None
|
|
if urbanrq.status_code == 200:
|
|
urbanjson = json.loads(urbanrq.text)
|
|
if (urbanjson.get('list') is not None):
|
|
# we may have found shit. keep going deeper.
|
|
if (urbanjson['list'].get('0') is not None):
|
|
# we found shit!
|
|
word = urbanjson['list']['0']['word']
|
|
def0 = urbanjson['list']['0']['definition']
|
|
exam0 = urbanjson['list']['0']['example']
|
|
embed=discord.Embed(title=word)
|
|
embed.add_field(name='Definition',value=def0,inline=False)
|
|
embed.add_field(name='Example',value=exam0,inline=False)
|
|
#embed.set_thumbnail(url=lkupuser.avatar)
|
|
await ctx.send(embed=embed)
|
|
else:
|
|
await ctx.reply("That word was not found.")
|
|
|
|
async def setup(bot):
|
|
print(f'Cog_FunCmds was initialized')
|
|
await bot.add_cog(FunCmds(bot)) |