wip: update readme
This commit is contained in:
22
README.md
22
README.md
@@ -1,2 +1,20 @@
|
|||||||
### Credits
|
<h1 align="center">
|
||||||
<div>Icons made by <a href="https://www.flaticon.com/authors/flat-icons" title="Flat Icons">Flat Icon
|
<img width="100" height="100" src="">
|
||||||
|
<br>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<h4 align="center">A full featured discord bot using python's <a href="https://pypi.org/project/discord.py/" target="_blank">discord.py</a> library.</h4>
|
||||||
|
|
||||||
|
<h1 align="center" style="margin: -2px">
|
||||||
|
<a target="_blank" href="https://lgtm.com/projects/g/gio101046/pyvis/alerts/">
|
||||||
|
<img src="https://img.shields.io/lgtm/alerts/g/gio101046/pyvis.svg?logo=lgtm&logoWidth=18" alt="looks good to me alerts badge">
|
||||||
|
</a>
|
||||||
|
<a target="_blank" href="https://lgtm.com/projects/g/gio101046/pyvis/context:python">
|
||||||
|
<img src="https://img.shields.io/lgtm/grade/python/g/gio101046/pyvis.svg?logo=lgtm&logoWidth=18" alt="looks good to me grade badge">
|
||||||
|
</a>
|
||||||
|
<a target="_blank" href="https://trello.com/b/ujOfE92E/pyvis">
|
||||||
|
<img src="https://img.shields.io/badge/-Trello-blue?logo=trello" alt="looks good to me trello badge">
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<!--<div>Icons made by <a href="https://www.flaticon.com/authors/flat-icons" title="Flat Icons">Flat Icon-->
|
||||||
21
cogs/fun.py
21
cogs/fun.py
@@ -2,7 +2,6 @@ import random
|
|||||||
import discord
|
import discord
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import requests
|
import requests
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
@@ -43,23 +42,3 @@ class Fun(commands.Cog):
|
|||||||
github_embed.set_footer(text=f"Repo created at • {repo_info['created_at'].split('T')[0]}")
|
github_embed.set_footer(text=f"Repo created at • {repo_info['created_at'].split('T')[0]}")
|
||||||
|
|
||||||
await ctx.send(embed=github_embed)
|
await ctx.send(embed=github_embed)
|
||||||
|
|
||||||
"""
|
|
||||||
@commands.command(usage="<member>")
|
|
||||||
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:")
|
|
||||||
"""
|
|
||||||
4
pyvis.py
4
pyvis.py
@@ -33,8 +33,8 @@ async def on_ready():
|
|||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_member_join(member):
|
async def on_member_join(member):
|
||||||
guild = discord.utils.find(lambda g: g.name == DISCORD_GUILD_NAME, bot.guilds)
|
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)
|
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")
|
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_gifs = json.loads(http_response.text)
|
||||||
|
|||||||
BIN
readme/python.png
Normal file
BIN
readme/python.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user