Skip to content

Commit 43a38a4

Browse files
committed
fix: database, return ephemeral, year, music help
1 parent e8d725d commit 43a38a4

31 files changed

+398
-455
lines changed

aki.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def callback(self, interaction: discord.Interaction):
102102

103103
# @commands.max_concurrency(1, per=BucketType.default, wait=False)
104104
async def Aki(ctx: commands.Context, cat: str, lang: str):
105-
if await command_check(ctx, "aki", "games"): return
105+
if await command_check(ctx, "aki", "games"): return await ctx.reply("command disabled", ephemeral=True)
106106
msg = await ctx.reply('Starting game…')
107107
if not cat: cat = 'people'
108108
if not lang: lang = 'en'

animepahe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
provider="https://gdjkhp.github.io/img/apdoesnthavelogotheysaidapistooplaintheysaid.png"
2222

2323
async def help_anime(ctx: commands.Context):
24-
if await command_check(ctx, "anime", "media"): return
24+
if await command_check(ctx, "anime", "media"): return await ctx.reply("command disabled", ephemeral=True)
2525
p = await get_guild_prefix(ctx)
2626
sources = [f"`{p}gogo` gogoanime", f"`{p}pahe` animepahe"]
2727
await ctx.reply("\n".join(sources))
@@ -71,7 +71,7 @@ def buildAnime(details: dict) -> discord.Embed:
7171
return embed
7272

7373
async def pahe_search(ctx: commands.Context, arg: str):
74-
if await command_check(ctx, "anime", "media"): return
74+
if await command_check(ctx, "anime", "media"): return await ctx.reply("command disabled", ephemeral=True)
7575
if not arg: return await ctx.reply(f"usage: `{await get_guild_prefix(ctx)}pahe <query>`")
7676
results = await new_req(f"https://animepahe.ru/api?m=search&q={arg.replace(' ', '+')}", headers, True)
7777
if not results: return await ctx.reply("none found")

c_ai_discord.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async def c_ai(bot: commands.Bot, msg: discord.Message):
169169

170170
async def add_char(ctx: commands.Context, text: str, search_type: int):
171171
if not ctx.guild: return await ctx.reply("not supported")
172-
if await command_check(ctx, "c.ai", "ai"): return
172+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
173173
# fucked up the perms again
174174
permissions = ctx.channel.permissions_for(ctx.me)
175175
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -196,7 +196,7 @@ async def add_char(ctx: commands.Context, text: str, search_type: int):
196196

197197
async def delete_char(ctx: commands.Context):
198198
if not ctx.guild: return await ctx.reply("not supported")
199-
if await command_check(ctx, "c.ai", "ai"): return
199+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
200200
# fucked up the perms again
201201
permissions = ctx.channel.permissions_for(ctx.me)
202202
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -212,7 +212,7 @@ async def delete_char(ctx: commands.Context):
212212

213213
async def t_chan(ctx: commands.Context):
214214
if not ctx.guild: return await ctx.reply("not supported")
215-
if await command_check(ctx, "c.ai", "ai"): return
215+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
216216
# fucked up the perms again
217217
permissions = ctx.channel.permissions_for(ctx.me)
218218
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -226,7 +226,7 @@ async def t_chan(ctx: commands.Context):
226226

227227
async def t_adm(ctx: commands.Context):
228228
if not ctx.guild: return await ctx.reply("not supported")
229-
if await command_check(ctx, "c.ai", "ai"): return
229+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
230230
# fucked up the perms again
231231
permissions = ctx.channel.permissions_for(ctx.me)
232232
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -239,7 +239,7 @@ async def t_adm(ctx: commands.Context):
239239

240240
async def t_mode(ctx: commands.Context):
241241
if not ctx.guild: return await ctx.reply("not supported")
242-
if await command_check(ctx, "c.ai", "ai"): return
242+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
243243
# fucked up the perms again
244244
permissions = ctx.channel.permissions_for(ctx.me)
245245
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -252,7 +252,7 @@ async def t_mode(ctx: commands.Context):
252252

253253
async def set_rate(ctx: commands.Context, num: str):
254254
if not ctx.guild: return await ctx.reply("not supported")
255-
if await command_check(ctx, "c.ai", "ai"): return
255+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
256256
# fucked up the perms again
257257
permissions = ctx.channel.permissions_for(ctx.me)
258258
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -271,7 +271,7 @@ async def set_rate(ctx: commands.Context, num: str):
271271

272272
async def view_char(ctx: commands.Context):
273273
if not ctx.guild: return await ctx.reply("not supported")
274-
if await command_check(ctx, "c.ai", "ai"): return
274+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
275275
# fucked up the perms again
276276
permissions = ctx.channel.permissions_for(ctx.me)
277277
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -294,7 +294,7 @@ async def view_char(ctx: commands.Context):
294294

295295
async def edit_char(ctx: commands.Context, rate: str):
296296
if not ctx.guild: return await ctx.reply("not supported")
297-
if await command_check(ctx, "c.ai", "ai"): return
297+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
298298
# fucked up the perms again
299299
permissions = ctx.channel.permissions_for(ctx.me)
300300
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -315,7 +315,7 @@ async def edit_char(ctx: commands.Context, rate: str):
315315

316316
async def reset_char(ctx: commands.Context):
317317
if not ctx.guild: return await ctx.reply("not supported")
318-
if await command_check(ctx, "c.ai", "ai"): return
318+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
319319
# fucked up the perms again
320320
permissions = ctx.channel.permissions_for(ctx.me)
321321
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -332,7 +332,7 @@ async def reset_char(ctx: commands.Context):
332332

333333
async def set_mention_mode(ctx: commands.Context, modes: str):
334334
if not ctx.guild: return await ctx.reply("not supported")
335-
if await command_check(ctx, "c.ai", "ai"): return
335+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
336336
# fucked up the perms again
337337
permissions = ctx.channel.permissions_for(ctx.me)
338338
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -364,7 +364,7 @@ async def set_mention_mode(ctx: commands.Context, modes: str):
364364

365365
async def voice_mode(ctx: commands.Context):
366366
if not ctx.guild: return await ctx.reply("not supported")
367-
if await command_check(ctx, "c.ai", "ai"): return
367+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
368368
# fucked up the perms again
369369
permissions = ctx.channel.permissions_for(ctx.me)
370370
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -377,7 +377,7 @@ async def voice_mode(ctx: commands.Context):
377377

378378
async def voice_only(ctx: commands.Context):
379379
if not ctx.guild: return await ctx.reply("not supported")
380-
if await command_check(ctx, "c.ai", "ai"): return
380+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
381381
# fucked up the perms again
382382
permissions = ctx.channel.permissions_for(ctx.me)
383383
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -390,7 +390,7 @@ async def voice_only(ctx: commands.Context):
390390

391391
async def voice_search(ctx: commands.Context, text: str):
392392
if not ctx.guild: return await ctx.reply("not supported")
393-
if await command_check(ctx, "c.ai", "ai"): return
393+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
394394
# fucked up the perms again
395395
permissions = ctx.channel.permissions_for(ctx.me)
396396
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -414,7 +414,7 @@ async def voice_search(ctx: commands.Context, text: str):
414414

415415
async def voice_delete(ctx: commands.Context):
416416
if not ctx.guild: return await ctx.reply("not supported")
417-
if await command_check(ctx, "c.ai", "ai"): return
417+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
418418
# fucked up the perms again
419419
permissions = ctx.channel.permissions_for(ctx.me)
420420
if not permissions.manage_webhooks or not permissions.manage_roles:
@@ -429,7 +429,7 @@ async def voice_delete(ctx: commands.Context):
429429
await ctx.reply(view=DeleteVoiceView(ctx, db["characters"], 0), embed=view_embed(ctx, db["characters"], 0, 0x808080))
430430

431431
async def c_help(ctx: commands.Context):
432-
if await command_check(ctx, "c.ai", "ai"): return
432+
if await command_check(ctx, "c.ai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
433433
p = await get_guild_prefix(ctx)
434434
text = [
435435
"# Character commands",

cobalt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async def get_filename(url):
8888
return ""
8989

9090
async def COBALT_API(ctx: commands.Context, args: str):
91-
if await command_check(ctx, "cob", "media"): return
91+
if await command_check(ctx, "cob", "media"): return await ctx.reply("command disabled", ephemeral=True)
9292
# async with ctx.typing():
9393
msg = await ctx.reply("…")
9494
old = round(time.time() * 1000)

gelbooru.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
from util_discord import command_check, description_helper, get_guild_prefix
99

1010
async def help_booru(ctx: commands.Context):
11-
if await command_check(ctx, "booru", "media"): return
11+
if await command_check(ctx, "booru", "media"): return await ctx.reply("command disabled", ephemeral=True)
1212
p = await get_guild_prefix(ctx)
1313
text = [f"`{p}gel` gelbooru", f"`{p}safe` safebooru", f"`{p}r34` rule34"]
1414
await ctx.reply("\n".join(text))
1515

1616
async def R34(ctx: commands.Context, arg: str):
17-
if await command_check(ctx, "booru", "media"): return
17+
if await command_check(ctx, "booru", "media"): return await ctx.reply("command disabled", ephemeral=True)
1818
if not ctx.guild or not ctx.channel.nsfw: return await ctx.reply("**No.**")
1919
if arg: await search_posts(ctx, arg, "r34")
2020
else: await view_collection(ctx, "r34")
2121

2222
async def GEL(ctx: commands.Context, arg: str):
23-
if await command_check(ctx, "booru", "media"): return
23+
if await command_check(ctx, "booru", "media"): return await ctx.reply("command disabled", ephemeral=True)
2424
if not ctx.guild or not ctx.channel.nsfw: return await ctx.reply("**No.**")
2525
if arg: await search_posts(ctx, arg, "gel")
2626
else: await view_collection(ctx, "gel")
2727

2828
async def SAFE(ctx: commands.Context, arg: str):
29-
if await command_check(ctx, "booru", "media"): return
29+
if await command_check(ctx, "booru", "media"): return await ctx.reply("command disabled", ephemeral=True)
3030
if arg: await search_posts(ctx, arg, "safe")
3131
else: await view_collection(ctx, "safe")
3232

gogoanime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def set_domain(ctx: commands.Context, arg: str):
2828
await ctx.reply(gogoanime)
2929

3030
async def Gogoanime(ctx: commands.Context, arg: str):
31-
if await command_check(ctx, "anime", "media"): return
31+
if await command_check(ctx, "anime", "media"): return await ctx.reply("command disabled", ephemeral=True)
3232
await get_domain()
3333
if arg: msg = await ctx.reply(f"Searching `{arg}`\nPlease wait…")
3434
else: msg = await ctx.reply("Imagine something that doesn't exist. Must be sad. You are sad. You don't belong here.\nLet's all love lain.")

googleai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async def req_real(url, json, headers, palm):
182182
]
183183

184184
async def GEMINI_REST(ctx: commands.Context | discord.Interaction, model: int, palm: bool, prompt: str=None, image: discord.Attachment=None):
185-
if await command_check(ctx, "googleai", "ai"): return
185+
if await command_check(ctx, "googleai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
186186
# async with ctx.typing():
187187
if isinstance(ctx, commands.Context):
188188
msg = await ctx.reply(f"{models[model]}\nGenerating response…")
@@ -221,7 +221,7 @@ async def GEMINI_REST(ctx: commands.Context | discord.Interaction, model: int, p
221221
await ctx.edit_original_response(content=f"{models[model]}\n**Took {round(time.time() * 1000)-old}ms**")
222222

223223
async def help_google(ctx: commands.Context):
224-
if await command_check(ctx, "googleai", "ai"): return
224+
if await command_check(ctx, "googleai", "ai"): return await ctx.reply("command disabled", ephemeral=True)
225225
p = await get_guild_prefix(ctx)
226226
text = [
227227
f"`{p}gemini` {models[1]}",

hangman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def QuizEmbed(words: list, index: int, settings: dict, players: dict, ctx: comma
167167
return e
168168

169169
async def HANG(ctx: commands.Context, mode: str, count: str, gtype: str, cat: str, diff: str):
170-
if await command_check(ctx, "hang", "games"): return
170+
if await command_check(ctx, "hang", "games"): return await ctx.reply("command disabled", ephemeral=True)
171171
msg = await ctx.reply("Writing dictionary…")
172172
params = f"```{await get_guild_prefix(ctx)}hang [mode: <all/hardcore/me> count: <1-50>, type: <any/word/quiz> category: <any/9-32> difficulty: <any/easy/medium/hard>```"
173173
if mode:

0 commit comments

Comments
 (0)