Compare commits

...

6 Commits
ipm ... develop

@ -11,6 +11,5 @@ class ViewedNews(Base):
__table__ = Table( __table__ = Table(
"viewed_news", "viewed_news",
Base.metadata, Base.metadata,
autoload=True,
autoload_with=SQLACHEMY autoload_with=SQLACHEMY
) )

@ -11,6 +11,5 @@ class Quotes(Base):
__table__ = Table( __table__ = Table(
"neeble_quotes", "neeble_quotes",
Base.metadata, Base.metadata,
autoload=True,
autoload_with=SQLACHEMY autoload_with=SQLACHEMY
) )

@ -5,7 +5,7 @@
█ ▄ █ ▄▄▄█ ▄▄▄█ ▄ ██ █▄▄▄█ ▄▄▄█ █ ▄ █ ▄▄▄█ ▄▄▄█ ▄ ██ █▄▄▄█ ▄▄▄█
█ █ █ █ █▄▄▄█ █▄▄▄█ █▄█ █ █ █▄▄▄ █ █ █ █ █▄▄▄█ █▄▄▄█ █▄█ █ █ █▄▄▄
█▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█ █▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█
Neeble version: 2023.10.09d Neeble version: 2025.01.14
Help with the development of neeble-bot in Help with the development of neeble-bot in
https://brejela.club/gitea/neeble-club/neeble https://brejela.club/gitea/neeble-club/neeble
Thank you! Thank you!

@ -6,6 +6,8 @@ import os
import json import json
from datetime import datetime, timedelta from datetime import datetime, timedelta
from time import sleep
from random import randrange from random import randrange
from discord import Embed, Intents from discord import Embed, Intents
@ -89,7 +91,12 @@ async def quote(bot: object, *quote: str) -> str:
if ex.args[0].find("Duplicate") != -1: if ex.args[0].find("Duplicate") != -1:
return await bot.send("There's already a quote from that same person, with that "\ return await bot.send("There's already a quote from that same person, with that "\
"exact match!") "exact match!")
return await bot.send(f'{ex.args}\n_What the fuck are you doing?_') elif ex.args[0].find("Lost") != -1:
await bot.send("SQL did an oopsie! Trying again...")
sleep(2)
qtid = set_quote(user, quote, date, "#nograb")
return await bot.send(f"Done: `{quote}\n` ID: `{qtid}`")
return await bot.send(f'{ex.args}\n_What the fuck are you doing?_')
else: else:
global stack_limit global stack_limit
stack_limit = int((count_quotes() * .25)) stack_limit = int((count_quotes() * .25))
@ -137,7 +144,13 @@ async def random_quote(bot: object) -> str:
global last_rq global last_rq
global last_rqer global last_rqer
global rq_abusers global rq_abusers
chosen_one = get_quotes(quote_id_stack) try:
chosen_one = get_quotes(quote_id_stack)
except Exception as ex:
if ex.args[0].find("Lost") != -1:
await bot.send("SQL did an oopsie! Trying again...")
sleep(2)
chosen_one = get_quotes(quote_id_stack)
stack_len = len(quote_id_stack) stack_len = len(quote_id_stack)
# The next two IF statements are meant to deal with `--rq` abuse # The next two IF statements are meant to deal with `--rq` abuse
@ -423,6 +436,8 @@ async def weather(bot: object, *location: str) -> str:
value=f'{msg.wind_speed} m/s' if msg.wind_speed else default_msg, value=f'{msg.wind_speed} m/s' if msg.wind_speed else default_msg,
) )
embed.set_footer(text="Provided by Openweather.org")
return await bot.send('**`Weather`**', embed=embed) return await bot.send('**`Weather`**', embed=embed)

@ -69,7 +69,7 @@ def displayweather(wdata) -> object:
case '10': case '10':
icon = ':white_sun_rain_cloud:' icon = ':white_sun_rain_cloud:'
case '11': case '11':
icon = ':thunder_cloud_lightning:' icon = ':thunder_cloud_rain:'
case '13': case '13':
icon = ':snowflake:' icon = ':snowflake:'
case '50': case '50':

Loading…
Cancel
Save