update references to codey.lol -> codey.horse [new domain]

This commit is contained in:
2026-02-21 07:59:40 -05:00
parent 64edcc7342
commit 31366d8df7
6 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
![](https://codey.lol/havoc-fv.jpg) ![](https://codey.horse/havoc-fv.jpg)
# Discord-Havoc Rewrite (Pycord) # Discord-Havoc Rewrite (Pycord)

View File

@@ -11,6 +11,7 @@ import aiosqlite as sqlite3
import logging import logging
import textwrap import textwrap
import regex import regex
import aiohttp
import requests import requests
import discord import discord
from disc_havoc import Havoc from disc_havoc import Havoc
@@ -739,9 +740,15 @@ class Meme(commands.Cog):
unique_memes: list = [] unique_memes: list = []
for item in message.attachments: for item in message.attachments:
if item.url and len(item.url) >= 20: if item.url and len(item.url) >= 20:
image: io.BytesIO = io.BytesIO( try:
requests.get(item.url, stream=True, timeout=20).raw.read() 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)) dupe_check = await self.dupe_check(Image.open(image))
if dupe_check: if dupe_check:
channel = message.channel channel = message.channel

View File

@@ -19,7 +19,7 @@ class Radio(commands.Cog):
1221615558492029050, 1221615558492029050,
), # Tuple: Guild Id, Chan Id ), # 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 self.LAST_NP_TRACK: Optional[str] = None
try: try:
self.radio_state_loop.cancel() self.radio_state_loop.cancel()

View File

@@ -79,7 +79,7 @@ class LyricsPaginator(discord.ui.View):
import urllib.parse import urllib.parse
encoded_artist = urllib.parse.quote(self.artist, safe='') encoded_artist = urllib.parse.quote(self.artist, safe='')
encoded_song = urllib.parse.quote(self.song, 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): for i, page in enumerate(pages):
embed = discord.Embed(title=f"{self.song}", color=discord.Color.blue(), url=lyrics_url) 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 # Set footer with just page info for multi-page, or no footer for single page
if len(pages) > 1: 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) self.embeds.append(embed)
# Store pagination data for persistence across bot restarts # Store pagination data for persistence across bot restarts

View File

@@ -17,7 +17,7 @@ class Util:
def __init__(self) -> None: def __init__(self) -> None:
self.URL_URBANDICTIONARY: str = "http://api.urbandictionary.com/v0/define" self.URL_URBANDICTIONARY: str = "http://api.urbandictionary.com/v0/define"
self.URL_NO: str = "https://api.codey.lol/misc/no" self.URL_NO: str = "https://api.codey.horse/misc/no"
self.URL_INSULTAPI: str = "https://insult.mattbas.org/api/insult" self.URL_INSULTAPI: str = "https://insult.mattbas.org/api/insult"
self.COMPLIMENT_GENERATOR = ComplimentGenerator() self.COMPLIMENT_GENERATOR = ComplimentGenerator()
self.dbs: dict[str, str | LiteralString] = { self.dbs: dict[str, str | LiteralString] = {

View File

@@ -13,7 +13,7 @@ async def get_now_playing() -> Optional[str]:
Returns: Returns:
str str
""" """
np_url: str = "https://api.codey.lol/radio/np" np_url: str = "https://api.codey.horse/radio/np"
try: try:
async with ClientSession() as session: async with ClientSession() as session:
async with await session.post( async with await session.post(