python - discord channel link in message -


using discord.py, making bot send users direct message if keyword of choosing mentioned.

everything working, except want add channel mentioned in message. here code:

        print("sending message")         sender = '{0.author.name}'.format(message)         channel = message.channel.name         server = '{0.server}'.format(message)         await client.send_message(member, server+": #"+channel+": "+sender+": "+msg) 

this results in correct message being composed, #channel part of message not clickable link if typed chat window myself. there different object should feeding message?

in discord: there channel mention. try way, message.channel.mention instead of message.channel.name should able link channel in pm or everywhere.

source: discord documentation


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -