So hey there... My bot has a Logging part, which just prints message and message author in the console...
import discord
class MyClient(discord.Client):
async def on_ready(self):
print('bot is running')
async def on_message(self, message):
if message.author == client.user:
return
print(str(message.author) + ": " + str(message.content))
client = MyClient()
client.run("token")
But I want to know, if I can print, on which server the message got written... I know, that you can import "guild" but I dont know, if it can be used for this. If yes, then how? Thanks for helping :D