Browse Source

хайпанем

huy
gsd 2 years ago
parent
commit
823903aba3
  1. 3
      bot.py
  2. 2
      other_ext/webhook_helper.py
  3. 6
      user_ext/freevip.py

3
bot.py

@ -10,6 +10,7 @@ from player import *
import traceback import traceback
from exceptions import * from exceptions import *
import asyncio, sys, argparse import asyncio, sys, argparse
from aiohttp.client_exceptions import ClientConnectionError
#Скрыть сообщение если надо ephemeral=True #Скрыть сообщение если надо ephemeral=True
class DiscordClient(commands.Bot): class DiscordClient(commands.Bot):
@ -78,6 +79,8 @@ class DiscordClient(commands.Bot):
return await interaction.followup.send("Слишком долгий ответ со стороны сервера, причины:\n1) Возможно бекенд сдох\n2)Cлишком долгий незапланированный ответ с сервера\n3)Стоит позвать помощь", ephemeral=True) return await interaction.followup.send("Слишком долгий ответ со стороны сервера, причины:\n1) Возможно бекенд сдох\n2)Cлишком долгий незапланированный ответ с сервера\n3)Стоит позвать помощь", ephemeral=True)
elif isinstance(error.original, NeedDiscordAuthOfSteam): elif isinstance(error.original, NeedDiscordAuthOfSteam):
return await interaction.followup.send("У тебя не привязан профиль стима к дискорду, ничего подобного делать тебе нельзя", ephemeral=True) return await interaction.followup.send("У тебя не привязан профиль стима к дискорду, ничего подобного делать тебе нельзя", ephemeral=True)
elif isinstance(error.original, ClientConnectionError):
return await interaction.followup.send("Сервис фактов13 не дал ответ, вероятно он умер, поэтому стоит немного подождать и может что-то изменится", ephemeral=True)
traceback.print_exc() traceback.print_exc()
return await interaction.followup.send("Возникла необратимая ошибка, хз что случилось. Попробуй еще раз!", ephemeral=True) return await interaction.followup.send("Возникла необратимая ошибка, хз что случилось. Попробуй еще раз!", ephemeral=True)

2
other_ext/webhook_helper.py

@ -29,7 +29,7 @@ class Extension:
"😇":("unban", {"profile":"", "discord_user":None}), "😇":("unban", {"profile":"", "discord_user":None}),
"<:hueglot:713139400028061767>":("kick", {"profile":"", "requester_profile":"", "discord_user":None}), "<:hueglot:713139400028061767>":("kick", {"profile":"", "requester_profile":"", "discord_user":None}),
"🔍":("profile", {"profile":"", "discord_user":None}), "🔍":("profile", {"profile":"", "discord_user":None}),
"🔎":("unban", {"profile":"", "requester_profile":"", "discord_user":None}) "🔎":("profile", {"profile":"", "requester_profile":"", "discord_user":None})
} }
@core.listen() @core.listen()

6
user_ext/freevip.py

@ -15,9 +15,9 @@ class Extension:
if player.permition: if player.permition:
return await interaction.followup.send(content="У тебя уже есть права, бесплатная випка тебе не нужна!") return await interaction.followup.send(content="У тебя уже есть права, бесплатная випка тебе не нужна!")
a = random.randint(1, 999) a = random.randint(1, 9)
b = random.randint(1, 999) b = random.randint(1, 9)
c = random.randint(1, 999) c = random.randint(1, 9)
d = a * b - c d = a * b - c
primer = f"{a} x {b} - {c} = ?" primer = f"{a} x {b} - {c} = ?"

Loading…
Cancel
Save