Created
January 10, 2025 03:45
-
-
Save akku1139/74132442c496c8f04f0b655eead4b031 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import os | |
TOKEN = "TOKEN" # Discordのtoken | |
ID = 1324402148137504800 # スパマーのID | |
client = discord.Client() | |
@client.event | |
async def on_ready(): | |
print(f"{client.user} is online!") | |
group_dms = [dm for dm in client.private_channels if isinstance(dm, discord.GroupChannel)] | |
left_count = 0 | |
for dm in group_dms: | |
if ID == dm.owner_id: | |
print(dm) | |
await dm.leave() | |
left_count += 1 | |
print(f"{left_count}件のグループDMからの退出が完了しました") | |
client.run(TOKEN) |
1324402148137504800
: aarrの荒らし
1320659175101038644
: niha君
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discord.py-selfをインストールしてください