-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow timeout-related commands to be used in multiple channels #5402
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
"from chatting. Reason is optional and will be shown to the target " | ||
"user and other moderators. Use \"/unban\" to remove a ban."; | ||
if (words.size() < 2) | ||
std::vector<PerformChannelAction> actions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'actions' is not initialized [cppcoreguidelines-init-variables]
std::vector<PerformChannelAction> actions; | |
std::vector<PerformChannelAction> actions = 0; |
b79ed44
to
2ecb541
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -1,6 +1,7 @@ | |||
#include "controllers/commands/builtin/twitch/Ban.hpp" | |||
|
|||
#include "Application.hpp" | |||
#include "common/QLogging.hpp" | |||
#include "controllers/accounts/AccountController.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: included header QLogging.hpp is not used directly [misc-include-cleaner]
#include "controllers/accounts/AccountController.hpp" | |
#include "controllers/accounts/AccountController.hpp" |
const auto &words = ctx.words; | ||
const auto &channel = ctx.channel; | ||
const auto *twitchChannel = ctx.twitchChannel; | ||
const auto command = QStringLiteral("/ban"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QStringLiteral" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <qstringliteral.h>
} | ||
else | ||
{ | ||
qCWarning(chatterinoCommands) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "qCWarning" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <qloggingcategory.h>
return ""; | ||
} | ||
|
||
assert(!actions.value().empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "assert" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <cassert>
@@ -1,5 +1,7 @@ | |||
#pragma once | |||
|
|||
#include "expected.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'expected.hpp' file not found [clang-diagnostic-error]
#include "expected.hpp"
^
class MockApplication : mock::EmptyApplication | ||
{ | ||
public: | ||
MockApplication() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use '= default' to define a trivial default constructor [modernize-use-equals-default]
tests/src/Commands.cpp:18:
- {
- }
+ = default;
tests/src/Commands.cpp
Outdated
|
||
} // namespace | ||
|
||
TEST(Commands, parseBanCommand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "TEST" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <gtest/gtest.h>
{ | ||
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::shared_ptr" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <memory>
tests/src/Commands.cpp
Outdated
}; | ||
auto oActions = commands::parseChannelAction(ctx, "/ban", "usage", false); | ||
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_TRUE" is directly included [misc-include-cleaner]
ASSERT_TRUE(oActions.has_value()) << oActions.error();
^
tests/src/Commands.cpp
Outdated
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); | ||
auto actions = *oActions; | ||
ASSERT_EQ(actions.size(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_EQ" is directly included [misc-include-cleaner]
ASSERT_EQ(actions.size(), 1);
^
In your example, you're using raw IDs but in other commands IDs have to be prefixed with Also, are |
I'm fine with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
const QString &sourceUserID, const QString &targetUserID, | ||
const QString &reason, const QString &displayName) | ||
{ | ||
getHelix()->banUser( | ||
twitchChannel->roomId(), sourceUserID, targetUserID, std::nullopt, | ||
reason, | ||
channelID, sourceUserID, targetUserID, std::nullopt, reason, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::nullopt" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <optional>
@@ -119,189 +121,269 @@ | |||
|
|||
namespace chatterino::commands { | |||
|
|||
QString sendBan(const CommandContext &ctx) | |||
nonstd::expected<std::vector<PerformChannelAction>, QString> parseChannelAction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "nonstd::expected_lite::expected" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:7:
- #include "providers/twitch/api/Helix.hpp"
+ #include "nonstd/expected.hpp"
+ #include "providers/twitch/api/Helix.hpp"
@@ -119,189 +121,269 @@ | |||
|
|||
namespace chatterino::commands { | |||
|
|||
QString sendBan(const CommandContext &ctx) | |||
nonstd::expected<std::vector<PerformChannelAction>, QString> parseChannelAction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::vector" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <vector>
{ | ||
return ""; | ||
// A ban action must be performed with a channel as a context | ||
return nonstd::make_unexpected( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "nonstd::expected_lite::make_unexpected" is directly included [misc-include-cleaner]
return nonstd::make_unexpected(
^
} | ||
|
||
if (twitchChannel == nullptr) | ||
QCommandLineParser parser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QCommandLineParser" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <qcommandlineparser.h>
tests/src/Commands.cpp
Outdated
|
||
} // namespace | ||
|
||
TEST(Commands, parseBanCommand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "TEST" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <gtest/gtest.h>
{ | ||
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::shared_ptr" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <memory>
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = | ||
std::make_shared<TwitchChannel>("forsen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::make_shared" is directly included [misc-include-cleaner]
std::make_shared<TwitchChannel>("forsen");
^
tests/src/Commands.cpp
Outdated
}; | ||
auto oActions = commands::parseChannelAction(ctx, "/ban", "usage", false); | ||
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_TRUE" is directly included [misc-include-cleaner]
ASSERT_TRUE(oActions.has_value()) << oActions.error();
^
tests/src/Commands.cpp
Outdated
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); | ||
auto actions = *oActions; | ||
ASSERT_EQ(actions.size(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_EQ" is directly included [misc-include-cleaner]
ASSERT_EQ(actions.size(), 1);
^
example: `/ban --channel 11148817 --channel 117166826 forsen game complainer` this would ban forsen with the reason `game complainer` in the two listed channels
520e12f
to
e03c5e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
const QString &sourceUserID, const QString &targetUserID, | ||
const QString &reason, const QString &displayName) | ||
{ | ||
getHelix()->banUser( | ||
twitchChannel->roomId(), sourceUserID, targetUserID, std::nullopt, | ||
reason, | ||
channelID, sourceUserID, targetUserID, std::nullopt, reason, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::nullopt" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <optional>
@@ -119,189 +121,269 @@ | |||
|
|||
namespace chatterino::commands { | |||
|
|||
QString sendBan(const CommandContext &ctx) | |||
nonstd::expected<std::vector<PerformChannelAction>, QString> parseChannelAction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "nonstd::expected_lite::expected" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:7:
- #include "providers/twitch/api/Helix.hpp"
+ #include "nonstd/expected.hpp"
+ #include "providers/twitch/api/Helix.hpp"
@@ -119,189 +121,269 @@ | |||
|
|||
namespace chatterino::commands { | |||
|
|||
QString sendBan(const CommandContext &ctx) | |||
nonstd::expected<std::vector<PerformChannelAction>, QString> parseChannelAction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::vector" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <vector>
{ | ||
return ""; | ||
// A ban action must be performed with a channel as a context | ||
return nonstd::make_unexpected( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "nonstd::expected_lite::make_unexpected" is directly included [misc-include-cleaner]
return nonstd::make_unexpected(
^
} | ||
|
||
if (twitchChannel == nullptr) | ||
QCommandLineParser parser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QCommandLineParser" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:14:
+ #include <qcommandlineparser.h>
tests/src/Commands.cpp
Outdated
|
||
} // namespace | ||
|
||
TEST(Commands, parseBanCommand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "TEST" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <gtest/gtest.h>
{ | ||
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::shared_ptr" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:8:
+ #include <memory>
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = | ||
std::make_shared<TwitchChannel>("forsen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::make_shared" is directly included [misc-include-cleaner]
std::make_shared<TwitchChannel>("forsen");
^
tests/src/Commands.cpp
Outdated
}; | ||
auto oActions = commands::parseChannelAction(ctx, "/ban", "usage", false); | ||
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_TRUE" is directly included [misc-include-cleaner]
ASSERT_TRUE(oActions.has_value()) << oActions.error();
^
tests/src/Commands.cpp
Outdated
|
||
ASSERT_TRUE(oActions.has_value()) << oActions.error(); | ||
auto actions = *oActions; | ||
ASSERT_EQ(actions.size(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "ASSERT_EQ" is directly included [misc-include-cleaner]
ASSERT_EQ(actions.size(), 1);
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 29. Check the log or trigger a new build to see more.
const QString &sourceUserID, const QString &targetUserID, | ||
const QString &reason, const QString &displayName) | ||
{ | ||
getHelix()->banUser( | ||
twitchChannel->roomId(), sourceUserID, targetUserID, std::nullopt, | ||
reason, | ||
channelID, sourceUserID, targetUserID, std::nullopt, reason, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::nullopt" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <optional>
const auto &words = ctx.words; | ||
const auto &channel = ctx.channel; | ||
const auto *twitchChannel = ctx.twitchChannel; | ||
const auto command = QStringLiteral("/ban"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QStringLiteral" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qstringliteral.h>
} | ||
else | ||
{ | ||
qCWarning(chatterinoCommands) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "qCWarning" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qloggingcategory.h>
channel->addMessage(makeSystemMessage(usageStr)); | ||
return ""; | ||
} | ||
assert(!actions.value().empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "assert" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <cassert>
}); | ||
const auto &reason = action.reason; | ||
|
||
QStringList userLoginsToFetch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QStringList" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qcontainerfwd.h>
} | ||
}; | ||
|
||
std::ostream &operator<<(std::ostream &os, const IncompleteHelixUser &u); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::ostream" is directly included [misc-include-cleaner]
src/controllers/commands/common/ChannelAction.hpp:4:
+ #include <ostream>
{ | ||
} | ||
|
||
ITwitchIrcServer *getTwitch() override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "chatterino::ITwitchIrcServer" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:6:
- #include "singletons/Settings.hpp"
+ #include "providers/twitch/TwitchIrcServer.hpp"
+ #include "singletons/Settings.hpp"
|
||
} // namespace | ||
|
||
TEST(Commands, parseBanActions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "TEST" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:10:
+ #include <gtest/gtest.h>
{ | ||
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::shared_ptr" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:10:
+ #include <memory>
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = | ||
std::make_shared<TwitchChannel>("forsen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::make_shared" is directly included [misc-include-cleaner]
std::make_shared<TwitchChannel>("forsen");
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 29. Check the log or trigger a new build to see more.
const QString &sourceUserID, const QString &targetUserID, | ||
const QString &reason, const QString &displayName) | ||
{ | ||
getHelix()->banUser( | ||
twitchChannel->roomId(), sourceUserID, targetUserID, std::nullopt, | ||
reason, | ||
channelID, sourceUserID, targetUserID, std::nullopt, reason, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::nullopt" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <optional>
const auto &words = ctx.words; | ||
const auto &channel = ctx.channel; | ||
const auto *twitchChannel = ctx.twitchChannel; | ||
const auto command = QStringLiteral("/ban"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QStringLiteral" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qstringliteral.h>
} | ||
else | ||
{ | ||
qCWarning(chatterinoCommands) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "qCWarning" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qloggingcategory.h>
channel->addMessage(makeSystemMessage(usageStr)); | ||
return ""; | ||
} | ||
assert(!actions.value().empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "assert" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <cassert>
}); | ||
const auto &reason = action.reason; | ||
|
||
QStringList userLoginsToFetch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "QStringList" is directly included [misc-include-cleaner]
src/controllers/commands/builtin/twitch/Ban.cpp:11:
+ #include <qcontainerfwd.h>
} | ||
}; | ||
|
||
std::ostream &operator<<(std::ostream &os, const IncompleteHelixUser &u); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::ostream" is directly included [misc-include-cleaner]
src/controllers/commands/common/ChannelAction.hpp:4:
+ #include <ostream>
{ | ||
} | ||
|
||
ITwitchIrcServer *getTwitch() override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "chatterino::ITwitchIrcServer" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:6:
- #include "singletons/Settings.hpp"
+ #include "providers/twitch/TwitchIrcServer.hpp"
+ #include "singletons/Settings.hpp"
|
||
} // namespace | ||
|
||
TEST(Commands, parseBanActions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "TEST" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:10:
+ #include <gtest/gtest.h>
{ | ||
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::shared_ptr" is directly included [misc-include-cleaner]
tests/src/Commands.cpp:10:
+ #include <memory>
MockApplication app; | ||
|
||
std::shared_ptr<TwitchChannel> channel = | ||
std::make_shared<TwitchChannel>("forsen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::make_shared" is directly included [misc-include-cleaner]
std::make_shared<TwitchChannel>("forsen");
^
This PR changes the behaviour of the following commands:
/ban
/timeout
/untimeout
All of those commands now accept one or more
--channel
parameters to override which channel the action should take place in.The
--channel
parameter accepts a channel ID or channel name with the same syntax as the other "user targets" do (e.g.id:11148817
orpajlada
)examples
Ban user in the chat you're typing in:
/ban weeb123
Ban user in the chat you're typing in, with a reason specified:
/ban weeb123 the ban reason
Ban user in a separate chat, with a reason specified:
/ban --channel pajlada weeb123 the ban reason
Ban user in two separate chats, with a reason specified:
/ban --channel pajlada --channel id:117166826 weeb123 the ban reason
Timeout user in the chat you're typing in:
/timeout weeb123
Timeout user in the chat you're typing in, with a reason specified:
/timeout weeb123 10m the timeout reason
Timeout user in a separate chat, with a reason specified:
/timeout --channel pajlada weeb123 10m the timeout reason
Timeout user in two separate chats, with a reason specified:
/timeout --channel pajlada --channel id:117166826 weeb123 10m the timeout reason
Unban user in the chat you're typing in:
/unban weeb123
Unban user in a separate chat:
/unban --channel pajlada weeb123
Unban user in two separate chats:
/unban --channel pajlada --channel id:117166826 weeb123