diff --git a/README.md b/README.md index 9ae5e29..481645a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ -### Credits -
Icons made by Flat Icon \ No newline at end of file +

+ +
+

+ +

A full featured discord bot using python's discord.py library.

+ +

+ + looks good to me alerts badge + + + looks good to me grade badge + + + looks good to me trello badge + +

+ + \ No newline at end of file diff --git a/cogs/fun.py b/cogs/fun.py index 64ebd10..2c4f837 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -2,7 +2,6 @@ import random import discord import requests import json -import os import requests from discord.ext import commands @@ -42,24 +41,4 @@ class Fun(commands.Cog): github_embed.add_field(name="Open Issues", value=repo_info['open_issues'], inline=True) github_embed.set_footer(text=f"Repo created at • {repo_info['created_at'].split('T')[0]}") - await ctx.send(embed=github_embed) - - """ - @commands.command(usage="") - async def welcome(self, ctx, member: str = "") -> None: - if len(member.strip()) == 0: - await ctx.send("**Please provide a member mention. ex.** `!welcome @gcode`") - return - - GIPHY_API_KEY = os.getenv("GIPHY_API_KEY") - - http_response = requests.get(f"https://api.giphy.com/v1/gifs/search?api_key={GIPHY_API_KEY}&q=welcome&limit=25&offset=0&rating=pg-13&lang=en") - welcome_gifs = json.loads(http_response.text) - welcome_gif = random.choice(welcome_gifs["data"]) - - gif_embed = discord.Embed() - gif_embed.set_image(url=welcome_gif["images"]["original"]["url"]) - - await ctx.send(embed=gif_embed) - await ctx.send(f"{member} **Welcome to {ctx.guild.name}!** :wave:") - """ \ No newline at end of file + await ctx.send(embed=github_embed) \ No newline at end of file diff --git a/pyvis.py b/pyvis.py index 9ea6c20..c0f0917 100644 --- a/pyvis.py +++ b/pyvis.py @@ -33,8 +33,8 @@ async def on_ready(): @bot.event async def on_member_join(member): - guild = discord.utils.find(lambda g: g.name == DISCORD_GUILD_NAME, bot.guilds) - welcome_channel = discord.utils.find(lambda c: c.name == "👋welcome", guild.channels) + guild = discord.utils.find(lambda g: g.name == DISCORD_GUILD_NAME, bot.guilds) # TODO: check if find will throw an error + welcome_channel = discord.utils.find(lambda c: c.name == "👋welcome", guild.channels) # TODO: remove welcome channel hardcod http_response = requests.get(f"https://api.giphy.com/v1/gifs/search?api_key={GIPHY_API_KEY}&q=welcome&limit=25&offset=0&rating=pg-13&lang=en") welcome_gifs = json.loads(http_response.text) diff --git a/readme/python.png b/readme/python.png new file mode 100644 index 0000000..ba72eb4 Binary files /dev/null and b/readme/python.png differ