diff --git a/classes/bot.py b/classes/bot.py index e0dfb6f3..650390ea 100644 --- a/classes/bot.py +++ b/classes/bot.py @@ -705,7 +705,7 @@ async def store_all_cwls(self, clan: coc.Clan): async def get_player_history(self, player_tag: str): url = f"https://api.clashofstats.com/players/{player_tag.replace('#', '')}/history/clans" - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(headers={"User-Agent" : self._config.clashofstats_user_agent}) as session: async with session.get(url) as resp: history = await resp.json() await session.close() diff --git a/classes/config.py b/classes/config.py index a0d3b6ad..e079270e 100644 --- a/classes/config.py +++ b/classes/config.py @@ -39,3 +39,5 @@ def __init__(self, remote_settings: dict): self.total_clusters = remote_settings.get('total_clusters') self.emoji_url = remote_settings.get('emoji_url') + + self.clashofstats_user_agent = remote_settings.get('clashofstats_user_agent') diff --git a/commands/ticketing/click.py b/commands/ticketing/click.py index f2b0382a..d39b4ab5 100644 --- a/commands/ticketing/click.py +++ b/commands/ticketing/click.py @@ -215,7 +215,6 @@ def check(res): button = panel.get_button(custom_id=ctx.data.custom_id) if button is None: return await ctx.send('Button No Longer Exists', ephemeral=True) - await button.send_log(log_type=LOG_TYPE.BUTTON_CLICK, user=ctx.user) players = [] @@ -321,12 +320,14 @@ def check(res): else: await res.response.send_message(content='Done!', components=[], ephemeral=True) + print(button.questions) if button.questions: if message: await message.delete() (message, questionaire_embed) = await ask_questions(bot=self.bot, ctx=ctx, questions=button.questions) embeds.append(questionaire_embed) + print("here again") channels = await open_ticket( bot=self.bot, ticket_panel=panel, diff --git a/requirements.txt b/requirements.txt index 2db35fea..1e2befe3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,6 @@ aiocache==0.12.2 -aiofiles==0.6.0 -aiokafka==0.10.0 APScheduler==3.9.1 -Babel==2.13.1 ballpark @ git+https://github.com/Mee6/python-ballpark.git@5ab86393ba8cb2f306187f393aca8ec5b3bbbbae -beautifulsoup4==4.10.0 -bs4==0.0.1 chat-exporter @ git+https://github.com/MagicTheDev/DiscordChatExporterPy@42ff2ae12628e62ace81e7f69205729c115a5ba6 coc.py==3.7.1 disnake @ git+https://github.com/MagicTheDev/disnake.git @@ -16,10 +11,10 @@ emoji==1.6.3 expiring-dict==1.1.0 fluent.runtime==0.4.0 ipython==8.13.0 -kafka-python==2.0.2 kaleido==0.2.1 loguru==0.7.2 matplotlib==3.7.1 +meilisearch-python-sdk==3.4.0 motor==3.5.1 msgspec==0.18.6 numerize==0.12 @@ -30,7 +25,6 @@ orjson==3.10.0 pandas==2.0.3 pendulum==3.0.0 plotly==5.14.1 -public-ip==0.12 pymitter==0.4.0 pymongo==4.8.0 python-dateutil==2.8.2