diff --git a/classes/bot.py b/classes/bot.py index ef23bbd1..f1fbb14e 100644 --- a/classes/bot.py +++ b/classes/bot.py @@ -469,7 +469,7 @@ async def webhook_send(self, webhook: disnake.Webhook, **kwargs): async def get_screenshot(self, player: coc.Player): tag = player.tag.replace('#', '') - url = f'https://api.clashking.xyz/ss/{tag}/706149153431879760' + url = f'https://api.clashk.ing/ss/{tag}/706149153431879760' async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=5 * 60)) as session: async with session.get(url) as response: @@ -564,7 +564,7 @@ async def get_players( } data = [f"players/{t.replace('#', '%23')}" for t in tag_set] async with aiohttp.ClientSession() as session: - async with session.post('https://api.clashking.xyz/ck/bulk', json=data, headers=headers) as response: + async with session.post('https://api.clashk.ing/ck/bulk', json=data, headers=headers) as response: data = await response.read() player_data: dict = ujson.loads(data) players.extend( diff --git a/classes/tickets.py b/classes/tickets.py index 5cab601f..36d0ee9b 100644 --- a/classes/tickets.py +++ b/classes/tickets.py @@ -141,7 +141,7 @@ async def send_log( bytes_=io.BytesIO(transcript.encode()), id=f'transcript-{thread_channel.id}', ) - link = f'https://api.clashking.xyz/renderhtml?url={link}' + link = f'https://api.clashk.ing/renderhtml?url={link}' buttons = disnake.ui.ActionRow() buttons.append_item(disnake.ui.Button(label=f'Thread Transcript', url=link)) @@ -151,7 +151,7 @@ async def send_log( bytes_=io.BytesIO(transcript.encode()), id=f'transcript-{ticket_channel.id}', ) - link = f'https://api.clashking.xyz/renderhtml?url={link}' + link = f'https://api.clashk.ing/renderhtml?url={link}' buttons.append_item(disnake.ui.Button(label=f'Channel Transcript', url=link)) components = [buttons] diff --git a/commands/embeds/utils.py b/commands/embeds/utils.py index b1955f82..f3576c77 100644 --- a/commands/embeds/utils.py +++ b/commands/embeds/utils.py @@ -70,7 +70,7 @@ def reverse_encoding(embed_dict: dict): async def shorten_link(url: str): - api_url = 'https://api.clashking.xyz/shortner' + api_url = 'https://api.clashk.ing/shortner' params = {'url': url} async with aiohttp.ClientSession() as session: async with session.get(api_url, params=params) as response: diff --git a/commands/leaderboards/utils.py b/commands/leaderboards/utils.py index 262b658f..d5f31b6a 100644 --- a/commands/leaderboards/utils.py +++ b/commands/leaderboards/utils.py @@ -289,7 +289,7 @@ async def image_board( 'title': re.sub('[*_`~/"#]', '', f'{(clan or server).name} Top {limit} {type.title()}'), } async with aiohttp.ClientSession(json_serialize=ujson.dumps) as session: - async with session.post('https://api.clashking.xyz/table', json=data) as response: + async with session.post('https://api.clashk.ing/table', json=data) as response: link = await response.json() await session.close() return f'{link.get("link")}?t={int(pend.now(tz=pend.UTC).timestamp())}' diff --git a/commands/other/commands.py b/commands/other/commands.py index 6f1f8c61..a15fab17 100644 --- a/commands/other/commands.py +++ b/commands/other/commands.py @@ -105,7 +105,7 @@ async def stat(self, ctx: disnake.ApplicationCommandInteraction): async with aiohttp.ClientSession() as session: try: - async with session.get("https://api.clashking.xyz/global/counts") as response: + async with session.get("https://api.clashk.ing/global/counts") as response: if response.status == 200: api_data = await response.json() else: diff --git a/commands/rosters/commands.py b/commands/rosters/commands.py index 61d50413..c4893e37 100644 --- a/commands/rosters/commands.py +++ b/commands/rosters/commands.py @@ -575,7 +575,7 @@ async def roster_restrict( base64_uuid = base64.urlsafe_b64encode(uuid_bytes).rstrip(b'=') url_safe_uuid = base64_uuid.decode('utf-8') await self.bot.rosters.update_one({'$and': [{'server_id': ctx.guild.id}, {'alias': roster}]}, {'$set': {'token': url_safe_uuid}}) - await ctx.send(content=f'Edit your roster here -> https://api.clashking.xyz/roster/?token={url_safe_uuid}', ephemeral=True) + await ctx.send(content=f'Edit your roster here -> https://api.clashk.ing/roster/?token={url_safe_uuid}', ephemeral=True) @roster.sub_command(name='list', description='List of rosters on this server') @commands.check_any(commands.has_permissions(manage_guild=True), check_commands()) @@ -823,7 +823,7 @@ async def on_button_click(self, ctx: disnake.MessageInteraction): base64_uuid = base64.urlsafe_b64encode(uuid_bytes).rstrip(b'=') url_safe_uuid = base64_uuid.decode('utf-8') await self.bot.rosters.update_one({'$and': [{'server_id': ctx.guild.id}, {'alias': roster.alias}]}, {'$set': {'token': url_safe_uuid}}) - await ctx.send(content=f'Edit your roster here -> https://api.clashking.xyz/roster/?token={url_safe_uuid}', ephemeral=True) + await ctx.send(content=f'Edit your roster here -> https://api.clashk.ing/roster/?token={url_safe_uuid}', ephemeral=True) elif 'Signup_' in str(ctx.data.custom_id): alias = str(ctx.data.custom_id).split('_')[1] diff --git a/commands/ticketing/commands.py b/commands/ticketing/commands.py index c60c7d52..b7a9f18d 100644 --- a/commands/ticketing/commands.py +++ b/commands/ticketing/commands.py @@ -333,7 +333,7 @@ async def ticket_account_apply( base64_uuid = base64.urlsafe_b64encode(uuid_bytes).rstrip(b'=') url_safe_uuid = base64_uuid.decode('utf-8') await self.bot.tickets.update_one({'$and': [{'server_id': ctx.guild.id}, {'name': ticket_panel}]}, {'$set': {'token': url_safe_uuid}}) - await ctx.send(content=f'Edit your roster here -> https://api.clashking.xyz/ticketing?token={url_safe_uuid}', ephemeral=True) + await ctx.send(content=f'Edit your roster here -> https://api.clashk.ing/ticketing?token={url_safe_uuid}', ephemeral=True) @ticket.sub_command( name='apply-rules', diff --git a/commands/war/utils.py b/commands/war/utils.py index 97049a76..195787e7 100644 --- a/commands/war/utils.py +++ b/commands/war/utils.py @@ -43,9 +43,9 @@ async def main_war_page(bot: CustomClient, war: coc.ClanWar, war_league=None, is color = disnake.Color.green() embed = disnake.Embed(description=f"[**{war.clan.name}**]({war.clan.share_link})", color=color) - time_line = f'[*View War Timeline*](https://api.clashking.xyz/timeline/{war.clan.tag.replace("#", "%23")}/{war.end_time.raw_time})\n' + time_line = f'[*View War Timeline*](https://api.clashk.ing/timeline/{war.clan.tag.replace("#", "%23")}/{war.end_time.raw_time})\n' if not is_previous: - time_line = f'[*View War Timeline*](https://api.clashking.xyz/timeline/{war.clan.tag.replace("#", "%23")})\n' + time_line = f'[*View War Timeline*](https://api.clashk.ing/timeline/{war.clan.tag.replace("#", "%23")})\n' embed.add_field( name=f"**War Against**", value=f"[**{war.opponent.name} ({war.opponent.tag})**]({war.opponent.share_link})\n­\n", diff --git a/utility/startup.py b/utility/startup.py index 96421445..d34f897f 100644 --- a/utility/startup.py +++ b/utility/startup.py @@ -96,7 +96,7 @@ def calculate_shard_distribution(total_shards, total_clusters): def create_config() -> 'Config': BOT_TOKEN = getenv('BOT_TOKEN') - bot_config_url = 'https://api.clashking.xyz/bot/config' + bot_config_url = 'https://api.clashk.ing/bot/config' bot_config = requests.get(bot_config_url, timeout=5, headers={'bot-token': BOT_TOKEN}).json() config = Config(remote_settings=bot_config) config.bot_token = BOT_TOKEN