Created
June 27, 2020 01:18
-
-
Save loudambiance/d3861a4ae29882ee861cc70a104b4d42 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
#!/usr/bin/python3 | |
import discord | |
class MyClient(discord.Client): | |
async def on_ready(self): | |
print('Logged in as') | |
print(self.user.name) | |
print(self.user.id) | |
print('------') | |
async def on_message(self, message): | |
channel = client.get_channel(<channel_id_to_send_to>) | |
print(message.content) | |
if message.channel == client.get_channel(<channel_id_to_monitor>): | |
if "[Chunkmaster]" in str(message.content): | |
await channel.send(message.content) | |
client = MyClient() | |
client.run('<token>') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment