im really good at breaking things

This commit is contained in:
Helixu 2021-12-18 11:37:01 +00:00
parent 22347815cb
commit 94976fb929

7
bot.py
View file

@ -3,7 +3,7 @@
import discord import discord
from discord import File, Streaming, Game, Activity, ActivityType, Status from discord import File, Streaming, Game, Activity, ActivityType, Status
from discord.ext import commands, tasks from discord.ext import commands, tasks
import io, aiohttp, asyncio, json, random, logging, requests, ping, socket import io, aiohttp, asyncio, json, random, logging, requests
foxmsgs = [ foxmsgs = [
@ -179,11 +179,6 @@ Foxtrot is open source! Find the code at <https://code.cat.casa/IPD/Foxtrot>
""") """)
@bot.command(brief="random meme") @bot.command(brief="random meme")
async def meme(ctx): async def meme(ctx):
try:
ping.verbose_ping('shitfest.net', count=5)
delay = ping.Ping('shitfest.net', timeout=2000).do()
except:
await ctx.send("An error has occured with this command.")
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get('https://api.shitfest.net/v2/random.php') as resp: async with session.get('https://api.shitfest.net/v2/random.php') as resp:
json = await resp.json() json = await resp.json()