path try
Browse files
app.py
CHANGED
@@ -52,22 +52,22 @@ class ButtonView(discord.ui.View):
|
|
52 |
|
53 |
@discord.ui.button(label='Image 1', style=discord.ButtonStyle.blurple)
|
54 |
async def image1_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
55 |
-
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[0], stage_1_result_path=self.stage_1_result_path)
|
56 |
self.stop()
|
57 |
|
58 |
@discord.ui.button(label='Image 2', style=discord.ButtonStyle.blurple)
|
59 |
async def image2_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
60 |
-
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[1], stage_1_result_path=self.stage_1_result_path)
|
61 |
self.stop()
|
62 |
|
63 |
@discord.ui.button(label='Image 3', style=discord.ButtonStyle.blurple)
|
64 |
async def image3_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
65 |
-
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[2], stage_1_result_path=self.stage_1_result_path)
|
66 |
self.stop()
|
67 |
|
68 |
@discord.ui.button(label='Image 4', style=discord.ButtonStyle.blurple)
|
69 |
async def image4_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
70 |
-
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[3], stage_1_result_path=self.stage_1_result_path)
|
71 |
self.stop()
|
72 |
|
73 |
#new
|
@@ -148,20 +148,21 @@ async def on_member_ban(guild, user):
|
|
148 |
await bot.log_channel.send(embed=embed)
|
149 |
|
150 |
@bot.event
|
151 |
-
async def
|
152 |
-
# User kicks
|
153 |
-
logs = await
|
154 |
-
kick_entry = logs
|
155 |
|
156 |
if kick_entry:
|
157 |
reason = kick_entry.reason
|
158 |
-
embed = Embed(description=f'User {
|
159 |
embed.add_field(name='Reason', value=reason, inline=False)
|
160 |
else:
|
161 |
-
embed = Embed(description=f'User {
|
162 |
|
163 |
await bot.log_channel.send(embed=embed)
|
164 |
|
|
|
165 |
#new
|
166 |
@bot.event
|
167 |
async def on_voice_state_update(member, before, after):
|
|
|
52 |
|
53 |
@discord.ui.button(label='Image 1', style=discord.ButtonStyle.blurple)
|
54 |
async def image1_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
55 |
+
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[0], stage_1_result_path=self.stage_1_result_path[0])
|
56 |
self.stop()
|
57 |
|
58 |
@discord.ui.button(label='Image 2', style=discord.ButtonStyle.blurple)
|
59 |
async def image2_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
60 |
+
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[1], stage_1_result_path=self.stage_1_result_path[1])
|
61 |
self.stop()
|
62 |
|
63 |
@discord.ui.button(label='Image 3', style=discord.ButtonStyle.blurple)
|
64 |
async def image3_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
65 |
+
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[2], stage_1_result_path=self.stage_1_result_path[2])
|
66 |
self.stop()
|
67 |
|
68 |
@discord.ui.button(label='Image 4', style=discord.ButtonStyle.blurple)
|
69 |
async def image4_button(self, button: discord.ui.Button, interaction: discord.Interaction):
|
70 |
+
await self.ctx.invoke(self.ctx.bot.get_command('dfif2'), image_path=self.image_paths[3], stage_1_result_path=self.stage_1_result_path[3])
|
71 |
self.stop()
|
72 |
|
73 |
#new
|
|
|
148 |
await bot.log_channel.send(embed=embed)
|
149 |
|
150 |
@bot.event
|
151 |
+
async def on_member_ban(guild, user):
|
152 |
+
# User kicks (temporary bans)
|
153 |
+
logs = await guild.audit_logs(limit=1, action=discord.AuditLogAction.ban).flatten()
|
154 |
+
kick_entry = next((log for log in logs if log.target == user), None)
|
155 |
|
156 |
if kick_entry:
|
157 |
reason = kick_entry.reason
|
158 |
+
embed = Embed(description=f'User {user.name} ({user.mention}) was kicked', color=Color.red())
|
159 |
embed.add_field(name='Reason', value=reason, inline=False)
|
160 |
else:
|
161 |
+
embed = Embed(description=f'User {user.name} ({user.mention}) was kicked', color=Color.red())
|
162 |
|
163 |
await bot.log_channel.send(embed=embed)
|
164 |
|
165 |
+
|
166 |
#new
|
167 |
@bot.event
|
168 |
async def on_voice_state_update(member, before, after):
|