Skip to content

Instantly share code, notes, and snippets.

@loudambiance
Created June 27, 2020 01:18
Show Gist options
  • Save loudambiance/d3861a4ae29882ee861cc70a104b4d42 to your computer and use it in GitHub Desktop.
Save loudambiance/d3861a4ae29882ee861cc70a104b4d42 to your computer and use it in GitHub Desktop.
#!/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