Skip to content

Commit

Permalink
Update logs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mayman007 authored Oct 12, 2022
1 parent 999e022 commit 624803b
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions cogs/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ async def server_confirm(self, interaction:discord.Interaction, button:discord.u
with open("jsons/server_log.json", "w") as f:
channel[str(interaction.user.guild.id)] = server_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your server's updates log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Server Log", description = "Your server's updates log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -45,7 +46,8 @@ async def roles_confirm(self, interaction:discord.Interaction, button:discord.ui
with open("jsons/roles_log.json", "w") as f:
channel[str(interaction.user.guild.id)] = roles_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your roles updates log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Roles Log", description = "Your roles' updates log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -73,7 +75,8 @@ async def members_confirm(self, interaction:discord.Interaction, button:discord.
with open("jsons/members_log.json", "w") as f:
channel[str(interaction.user.guild.id)] = members_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your members' updates log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Members Log", description = "Your members' updates log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -101,7 +104,8 @@ async def channels_confirm(self, interaction:discord.Interaction, button:discord
with open("jsons/channels_log.json", "w") as f:
channel[str(interaction.user.guild.id)] = channels_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your channels' updates log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Channels Log", description = "Your channels' updates log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -129,7 +133,8 @@ async def edits_confirm(self, interaction:discord.Interaction, button:discord.ui
with open("jsons/msg_edits.json", "w") as f:
channel[str(interaction.user.guild.id)] = edits_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your edited message log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Edited Messages Log", description = "Your edited messages log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -157,7 +162,8 @@ async def deletes_confirm(self, interaction:discord.Interaction, button:discord.
with open("jsons/msg_deletes.json", "w") as f:
channel[str(interaction.user.guild.id)] = deletes_log_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your deleted messages log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Deleted Messages Log", description = "Your deleted messages log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -185,7 +191,8 @@ async def joins_confirm(self, interaction:discord.Interaction, button:discord.ui
with open("jsons/joins.json", "w") as f:
channel[str(interaction.user.guild.id)] = joins_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your members' joins log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Joins Log", description = "Your members' joins log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down Expand Up @@ -213,7 +220,8 @@ async def leaves_confirm(self, interaction:discord.Interaction, button:discord.u
with open("jsons/leaves.json", "w") as f:
channel[str(interaction.user.guild.id)] = leaves_channel
json.dump(channel, f, sort_keys=True, indent=4, ensure_ascii=False)
await interaction.response.send_message("> Your members' leaves log channel has been updated succesfully!")
embed = discord.Embed(title = "📝 ┃ Leaved Log", description = "Your members' leaves log channel has been updated succesfully!", color = 0x000000)
await interaction.response.send_message(embed = embed)
for child in self.children:
child.disabled=True
await interaction.message.edit(view=self)
Expand Down

0 comments on commit 624803b

Please sign in to comment.