Optionally use Discord nicknames
This commit is contained in:
parent
b70ce6e79e
commit
cb9fd7b06e
@ -30,6 +30,7 @@ port = 8080
|
||||
channel_id = 576585506658189332
|
||||
allow_logins = true
|
||||
clean_invites = true
|
||||
use_nicknames = true
|
||||
```
|
||||
|
||||
4. Set `discord.port` in your `minetest.conf` to match the port you used in `relay.conf`. You may also set `discord.text_color` to a hex color string if you'd like to color relayed messages from Discord.
|
||||
|
@ -6,3 +6,4 @@ port = 8080
|
||||
channel_id = <Discord channel ID goes here>
|
||||
allow_logins = true
|
||||
clean_invites = true
|
||||
use_nicknames = true
|
@ -50,6 +50,7 @@ port = int(config['RELAY']['port'])
|
||||
token = config['BOT']['token']
|
||||
logins_allowed = True if config['RELAY']['allow_logins'] == 'true' else False
|
||||
do_clean_invites = True if config['RELAY']['clean_invites'] == 'true' else False
|
||||
do_use_nicknames = True if config['RELAY']['use_nicknames'] == 'true' else False
|
||||
|
||||
last_request = 0
|
||||
|
||||
@ -113,7 +114,7 @@ async def on_message(message):
|
||||
if check_timeout():
|
||||
if (message.channel.id == channel_id) and (message.author.id != bot.user.id):
|
||||
msg = {
|
||||
'author': message.author.name,
|
||||
'author': message.author.name if not do_use_nicknames else message.author.display_name,
|
||||
'content': message.content.replace('\n', '/')
|
||||
}
|
||||
if do_clean_invites:
|
||||
|
Loading…
x
Reference in New Issue
Block a user