4
votes

it's possible to copy new messages from X server Y channel to my X server Y channel, using bot in Discord? the server from which I want to copy the message is the official game server (on Discord) where I connect as a user, and my server is the guild server for this game where I want to send news and update announcements.

sorry for my English

1

1 Answers

2
votes

This certainly is possible, using the on_message() event:

@bot.event
async def on_message(message):
    await bot.process_commands(message) # add this if also using cmd decorators
    if message.channel.id == THEIR_CHANNEL_ID_HERE:
        target_channel = bot.get_channel(YOUR_ANNOUNCEMENT_CHANNEL_ID_HERE)
        await target_channel.send(message.content)

And of course you can add checks for file attachments, specific users, etc if you want to.


References: