update references to codey.lol -> codey.horse [new domain]
This commit is contained in:
13
cogs/meme.py
13
cogs/meme.py
@@ -11,6 +11,7 @@ import aiosqlite as sqlite3
|
||||
import logging
|
||||
import textwrap
|
||||
import regex
|
||||
import aiohttp
|
||||
import requests
|
||||
import discord
|
||||
from disc_havoc import Havoc
|
||||
@@ -739,9 +740,15 @@ class Meme(commands.Cog):
|
||||
unique_memes: list = []
|
||||
for item in message.attachments:
|
||||
if item.url and len(item.url) >= 20:
|
||||
image: io.BytesIO = io.BytesIO(
|
||||
requests.get(item.url, stream=True, timeout=20).raw.read()
|
||||
)
|
||||
try:
|
||||
async with ClientSession() as dl_session:
|
||||
async with dl_session.get(item.url, timeout=aiohttp.ClientTimeout(total=20)) as resp:
|
||||
if resp.status != 200:
|
||||
continue
|
||||
image_data = await resp.read()
|
||||
except Exception:
|
||||
continue
|
||||
image: io.BytesIO = io.BytesIO(image_data)
|
||||
dupe_check = await self.dupe_check(Image.open(image))
|
||||
if dupe_check:
|
||||
channel = message.channel
|
||||
|
||||
@@ -19,7 +19,7 @@ class Radio(commands.Cog):
|
||||
1221615558492029050,
|
||||
), # Tuple: Guild Id, Chan Id
|
||||
}
|
||||
self.STREAM_URL: str = "https://stream.codey.lol/sfm.ogg"
|
||||
self.STREAM_URL: str = "https://stream.codey.horse/sfm.ogg"
|
||||
self.LAST_NP_TRACK: Optional[str] = None
|
||||
try:
|
||||
self.radio_state_loop.cancel()
|
||||
|
||||
@@ -79,7 +79,7 @@ class LyricsPaginator(discord.ui.View):
|
||||
import urllib.parse
|
||||
encoded_artist = urllib.parse.quote(self.artist, safe='')
|
||||
encoded_song = urllib.parse.quote(self.song, safe='')
|
||||
lyrics_url = f"https://codey.lol/#{encoded_artist}/{encoded_song}"
|
||||
lyrics_url = f"https://codey.horse/#{encoded_artist}/{encoded_song}"
|
||||
|
||||
for i, page in enumerate(pages):
|
||||
embed = discord.Embed(title=f"{self.song}", color=discord.Color.blue(), url=lyrics_url)
|
||||
@@ -88,7 +88,7 @@ class LyricsPaginator(discord.ui.View):
|
||||
|
||||
# Set footer with just page info for multi-page, or no footer for single page
|
||||
if len(pages) > 1:
|
||||
embed.set_footer(text=f"Page {i + 1} of {len(pages)}", icon_url="https://codey.lol/favicon.ico")
|
||||
embed.set_footer(text=f"Page {i + 1} of {len(pages)}", icon_url="https://codey.horse/favicon.ico")
|
||||
self.embeds.append(embed)
|
||||
|
||||
# Store pagination data for persistence across bot restarts
|
||||
|
||||
Reference in New Issue
Block a user