Skip to content

Commit

Permalink
feat: removed inputs file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyvy-vi committed Mar 8, 2021
1 parent 9088cfe commit be0b44e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1,779 deletions.
24 changes: 13 additions & 11 deletions bot/cogs/coffee.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
import random
from random import choice

import motor.motor_asyncio as motor
from discord import Member, Embed
from discord.ext import commands
from discord.ext.commands import Context
from .utils.inputs import cl, cf, chill, cfe, ur

from .utils.colo import COLOR


class Coffee(commands.Cog):
def __init__(self, client):
self.client = client

self.data = motor.AsyncIOMotorClient(client.MONGO).DATA.inputs
@commands.command(aliases=['ask_out'])
async def wannagrabacoffee(self, ctx: Context, *, member: Member):
'''Wanna ask someone out on coffee'''
res = await self.data.find_one({'type': 'coffee'})
embed = Embed(
title=f'{member}, Someone wants to grab a coffee with you...*wink *wink',
color=COLOR.DEFAULT)
embed.add_field(name='This happened....', value=f'{random.choice(cf)}')
embed.set_footer(text='not actually')
color=COLOR.COFFEE)
embed.add_field(name='This happened....', value=choice(res['events']))
embed.set_footer(text='not actually :P')
await ctx.send(embed=embed)

@commands.command(aliases=['brew'])
async def coffee(self, ctx: Context):
'''A lovely coffee command (sip, sip)'''
op = f'{random.choice(cfe)}'
res = await self.data.find_one({'type': 'coffee'})
embed = Embed(title='Coffee',
description=op,
color=COLOR.DEFAULT)
description=choice(res['text']),
color=COLOR.COFFEE)
embed.set_footer(
text=f'Caffeiene Level-{random.choice(cl)}.{random.choice(chill)}')
embed.set_image(url=random.choice(ur))
text=f"Caffeiene Level-{choice(res['strength'])}. {choice(res['msg'])}")
embed.set_image(url=choice(res['img']))
await ctx.send(embed=embed)


Expand Down
34 changes: 23 additions & 11 deletions bot/cogs/fun.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
import random

import motor.motor_asyncio as motor

from discord import Embed, Member
from discord.ext import commands
from discord.ext.commands import Context

from .utils.inputs import responses, fortunes, quo, nerd, tech, bk, cmp, blurt, jk
from .utils.colo import COLOR


class Fun(commands.Cog):
def __init__(self, client):
self.client = client
self.data = motor.AsyncIOMotorClient(client.MONGO).DATA.inputs

@commands.command(aliases=["8ball"])
async def magicball(self, ctx: Context, *, question: str):
"""use an 8ball"""
res = await self.data.find_one({'type': '8ball'})
embed = Embed(title="8Ball :8ball:",
colour=COLOR.DEFAULT)
embed.add_field(name=f"*Question: {question}*",
value=f"Conjecture: {random.choice(responses)}")
value=f"Conjecture: {random.choice(res['text'])}")
await ctx.send(embed=embed)

@commands.command(aliases=["future"])
async def fortune(self, ctx: Context):
"""Gives you your terrible fortune"""
res = await self.data.find_one({'type': 'fortunes'})
embed = Embed(title='Fortune', color=COLOR.DEFAULT)
embed.add_field(name='Your Fortune', value=random.choice(fortunes))
embed.add_field(name='Your Fortune', value=random.choice(res['text']))
await ctx.send(embed=embed)

@commands.command(aliases=['wisdom'])
async def quote(self, ctx: Context):
"""Gives you a dose of motivational quotes"""
randq = random.choice(list(quo.keys()))
quote_text = f'`{randq}`\n_~{quo[randq]}_'
res = await self.data.find_one({'type': 'quotes'})
randq = random.choice(list(res['text'].keys()))
quote_text = f"`{randq.replace('|', '.')}`\n_~{res['text'][randq]}_"
embed = Embed(
title='Quote',
description=quote_text,
Expand All @@ -41,52 +47,58 @@ async def quote(self, ctx: Context):
@commands.command(aliases=['joke', 'pun'])
async def dadjoke(self, ctx: Context):
"""Gives you some dad puns"""
res = await self.data.find_one({'type': 'puns'})
embed = Embed(title='Dad joke huh 😏', color=COLOR.RANDOM())
embed.add_field(name=random.choice(jk),
embed.add_field(name=random.choice(res['text']),
value='_looks at you, expecting you to laugh_')
await ctx.send(embed=embed)

@commands.command(aliases=['nerdystuff', 'smartystuff', 'bigbrains'])
async def nerd(self, ctx: Context):
"""returns some nerdy stuff"""
res = await self.data.find_one({'type': 'nerd'})
embed = Embed(title='Nerdy Stuff', color=COLOR.JOY)
embed.add_field(
name='Take this you NERD',
value=f'{random.choice(nerd)}')
value=random.choice(res['text']))
await ctx.send(embed=embed)

@commands.command(aliases=['tehc', 'hackerman'])
async def geek(self, ctx: Context):
"""returns some geeky gibberish"""
res = await self.data.find_one({'type': 'tech'})
embed = Embed(title='Geek', color=COLOR.JOY)
embed.add_field(name="Ahh I am a hackerman",
value=f'{random.choice(tech)}')
value=random.choice(res['text']))
await ctx.send(embed=embed)

@commands.command(aliases=['commend'])
async def compliment(self, ctx: Context, *, member: Member = None):
"""Wanna shoot some compliments"""
user = ctx.message.author if not member else member
res = await self.data.find_one({'type': 'compliments'})
embed = Embed(title='Compliment', color=COLOR.JOY)
embed.add_field(name="Here's a compliment for you",
value=f'{user}, {random.choice(cmp)}')
value=f"{user}, {random.choice(res['text'])}")
await ctx.send(embed=embed)

@commands.command()
async def flirt(self, ctx: Context, *, member: Member = None):
"""Flirting with bots is nice"""
user = ctx.message.author if not member else member
res = await self.data.find_one({'type': 'flirts'})
embed = Embed(title='Flirt', color=COLOR.DEFAULT)
embed.add_field(name='Flirt it away',
value=f'{user}, {random.choice(blurt)}')
value=f"{user}, {random.choice(res['text'])}")
await ctx.send(embed=embed)

@commands.command(aliases=['goodread'])
async def book(self, ctx: Context):
"""returns you some epic book recomendation"""
res = await self.data.find_one({'type': 'books'})
embed = Embed(title='Book', color=COLOR.JOY)
embed.add_field(name="Here's a book recomendation: ",
value=f'{random.choice(bk)}')
value=random.choice(res['text']))
await ctx.send(embed=embed)


Expand Down
1 change: 1 addition & 0 deletions bot/cogs/utils/colo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class COLOR:
ECONOMY = 0x85bb65
WIKI = 0xa9a9aa
XKCD = 0x96a8c8
COFFEE = 0x8c4e08

@staticmethod
def RANDOM() -> int:
Expand Down
Loading

0 comments on commit be0b44e

Please sign in to comment.