Use Discord AllowedMentions
This commit is contained in:
parent
058eaa94d1
commit
ca5e0b2d28
1 changed files with 4 additions and 4 deletions
8
main.py
8
main.py
|
@ -151,9 +151,6 @@ class MatrixClient(nio.AsyncClient):
|
||||||
if member:
|
if member:
|
||||||
message = message.replace(mention[1], member[0].mention)
|
message = message.replace(mention[1], member[0].mention)
|
||||||
|
|
||||||
message = message.replace("@everyone", "@\u200Beveryone")
|
|
||||||
message = message.replace("@here", "@\u200Bhere")
|
|
||||||
|
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,7 +315,10 @@ def main():
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
intents.members = True
|
intents.members = True
|
||||||
|
|
||||||
DiscordClient(intents=intents).run(config["token"])
|
allowed_mentions = discord.AllowedMentions(everyone=False, roles=False)
|
||||||
|
|
||||||
|
DiscordClient(intents=intents, allowed_mentions=allowed_mentions).run(
|
||||||
|
config["token"])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue