Skip to content

Commit 3125be3

Browse files
committed
Added an anon_tag config variable
1 parent e435f09 commit 3125be3

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- `anonreply` command to anonymously reply to the recipient.
12-
The username of the anonymous user defaults to the `mod_tag` (the footer text of a mod reply). The avatar defaults the guild icon url. However you can change both of these via the `anon_username` and `anon_avatar_url` config variables.
12+
The username of the anonymous user defaults to the `mod_tag` (the footer text of a mod reply). The avatar defaults the guild icon url. However you can change both of these via the `anon_username`, `anon_avatar_url` and `anon_tag` config variables.
1313

1414
### Changed
1515
Your bot now logs all messages sent in a thread channel, including discussions that take place. You can now toggle to view them in the log viewer app.

core/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class ConfigManager:
1111
'mention', 'disable_autoupdates', 'prefix',
1212
'main_category_id', 'sent_emoji', 'blocked_emoji',
1313
'thread_creation_response', 'twitch_url', 'mod_color',
14-
'recipient_color', 'mod_tag', 'anon_username', 'anon_avatar_url'
14+
'recipient_color', 'mod_tag', 'anon_username', 'anon_avatar_url',
15+
'anon_tag'
1516
}
1617

1718
internal_keys = {

core/thread.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ async def reply(self, message, anonymous=False):
195195

196196
tasks = [
197197
# in thread channel
198-
self.send(message, destination=self.channel, from_mod=True, anonymous=True),
198+
self.send(message, destination=self.channel, from_mod=True, anonymous=anonymous),
199199
# to user
200-
self.send(message, destination=self.recipient, from_mod=True, anonymous=True)
200+
self.send(message, destination=self.recipient, from_mod=True, anonymous=anonymous)
201201
]
202202

203203

@@ -317,7 +317,7 @@ def is_image_url(u, _):
317317
elif not anonymous:
318318
em.set_footer(text=self.bot.config.get('mod_tag', 'Moderator')) # Normal messages
319319
else:
320-
em.set_footer(text='\u200b') # Anonymous reply sent to user
320+
em.set_footer(text=self.bot.config.get('anon_tag', 'Response')) # Anonymous reply sent to user
321321

322322
elif note:
323323
em.color = discord.Color.blurple()

0 commit comments

Comments
 (0)