Skip to content

Commit 7e8fde3

Browse files
committed
Add reply without command functionality resolves #75
1 parent ab08a36 commit 7e8fde3

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
8+
# v2.17.0
9+
10+
### What's new?
11+
12+
Added a config option `reply_without_command` that when present, enables the bot to forward any message sent in a thread channel to the recipient. (Replying without using a command)
13+
14+
To enable this functionality, do `?config set reply_without_command true` and to disable it, use `?config del reply_without_command`.
15+
16+
17+
### Changed
18+
19+
The `move` command now only requires `manage_messages` perms instead of `manage_channels`
20+
721
# v2.16.1
822

923
### Fixed

bot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.16.1'
25+
__version__ = '2.17.0'
2626

2727
import asyncio
2828
import logging
@@ -623,7 +623,10 @@ async def on_message(self, message):
623623

624624
thread = await self.threads.find(channel=ctx.channel)
625625
if thread is not None:
626-
await self.api.append_log(message, type_='internal')
626+
if self.config.get('reply_without_command'):
627+
await thread.reply(message)
628+
else:
629+
await self.api.append_log(message, type_='internal')
627630
elif ctx.invoked_with:
628631
exc = commands.CommandNotFound(
629632
'Command "{}" is not found'.format(ctx.invoked_with)

core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ConfigManager(ConfigManagerABC):
1919

2020
# bot settings
2121
'main_category_id', 'disable_autoupdates', 'prefix', 'mention',
22-
'main_color', 'user_typing', 'mod_typing', 'account_age',
22+
'main_color', 'user_typing', 'mod_typing', 'account_age', 'reply_without_command',
2323

2424
# logging
2525
'log_channel_id',

0 commit comments

Comments
 (0)