Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
cleanup; split into posted, edited, deleted channels
Browse files
app.py
CHANGED
@@ -39,7 +39,10 @@ message_cache = {}
|
|
39 |
|
40 |
# twitter
|
41 |
WATCHED_USER = 'Awk20000'
|
42 |
-
CHANNEL_ID = 123456789012345678
|
|
|
|
|
|
|
43 |
last_tweet = None
|
44 |
|
45 |
# stats stuff ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
@@ -101,8 +104,8 @@ async def on_message(message):
|
|
101 |
embed.set_image(url=gif_url)
|
102 |
embed.add_field(name="GIF Link", value=gif_url, inline=False)
|
103 |
|
104 |
-
|
105 |
-
await
|
106 |
#dm_message = await lunarflu.send(embed=embed)
|
107 |
|
108 |
|
@@ -231,7 +234,8 @@ async def on_message_edit(before, after):
|
|
231 |
embed.add_field(name="Attachments", value=attachment_urls, inline=False)
|
232 |
#embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}")
|
233 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
234 |
-
|
|
|
235 |
|
236 |
except Exception as e:
|
237 |
print(f"on_message_edit Error: {e}")
|
@@ -262,7 +266,9 @@ async def on_raw_message_delete(payload):
|
|
262 |
embed.add_field(name="Attachments", value=attachment_urls, inline=False)
|
263 |
#embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}")
|
264 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
265 |
-
|
|
|
|
|
266 |
|
267 |
except Exception as e:
|
268 |
print(f"on_message_delete Error: {e}")
|
@@ -403,7 +409,6 @@ async def on_member_unban(guild, unbanned_user):
|
|
403 |
async def on_member_join(member):
|
404 |
try:
|
405 |
await asyncio.sleep(5)
|
406 |
-
# initialize lvl1 on join
|
407 |
guild = bot.get_guild(1346208250995015754)
|
408 |
|
409 |
embed = Embed(color=Color.blue())
|
|
|
39 |
|
40 |
# twitter
|
41 |
WATCHED_USER = 'Awk20000'
|
42 |
+
CHANNEL_ID = 123456789012345678
|
43 |
+
POSTED = 1380960802990854204
|
44 |
+
EDITED = 1380960825795411978
|
45 |
+
DELETED = 1380960864990924941
|
46 |
last_tweet = None
|
47 |
|
48 |
# stats stuff ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
104 |
embed.set_image(url=gif_url)
|
105 |
embed.add_field(name="GIF Link", value=gif_url, inline=False)
|
106 |
|
107 |
+
POSTED_CHANNEL = bot.get_channel(1380960802990854204)
|
108 |
+
await POSTED_CHANNEL.send(embed=embed)
|
109 |
#dm_message = await lunarflu.send(embed=embed)
|
110 |
|
111 |
|
|
|
234 |
embed.add_field(name="Attachments", value=attachment_urls, inline=False)
|
235 |
#embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}")
|
236 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
237 |
+
EDITED_CHANNEL = bot.get_channel(1380960825795411978)
|
238 |
+
await EDITED_CHANNEL.send(embed=embed)
|
239 |
|
240 |
except Exception as e:
|
241 |
print(f"on_message_edit Error: {e}")
|
|
|
266 |
embed.add_field(name="Attachments", value=attachment_urls, inline=False)
|
267 |
#embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}")
|
268 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
269 |
+
|
270 |
+
DELETED_CHANNEL = bot.get_channel(1380960864990924941)
|
271 |
+
await DELETED_CHANNEL.send(embed=embed)
|
272 |
|
273 |
except Exception as e:
|
274 |
print(f"on_message_delete Error: {e}")
|
|
|
409 |
async def on_member_join(member):
|
410 |
try:
|
411 |
await asyncio.sleep(5)
|
|
|
412 |
guild = bot.get_guild(1346208250995015754)
|
413 |
|
414 |
embed = Embed(color=Color.blue())
|