diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-16 21:58:52 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-16 21:58:52 +0500 |
| commit | 4ebfa4f82679b5edafca70b2da1646d5d1b2decc (patch) | |
| tree | a7fb2a89954cb23a712816d491b2a3163668ffcd /src/commands | |
| parent | 49e41eaff5c219e4e8452188f19974bf019c33e4 (diff) | |
upd: send nothing if the channel is opted out
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/request_util.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands/request_util.cpp b/src/commands/request_util.cpp index 3d44054..90750e5 100644 --- a/src/commands/request_util.cpp +++ b/src/commands/request_util.cpp @@ -65,6 +65,11 @@ namespace bot::command { schemas::Channel channel(query[0]); + if (channel.get_opted_out_at().has_value()) { + delete work; + return std::nullopt; + } + query = work->exec("SELECT * FROM channel_preferences WHERE channel_id = " + std::to_string(channel.get_id())); |
