2020-05-10 12:45:19 +02:00
|
|
|
#pragma once
|
|
|
|
|
2022-05-08 12:27:25 +02:00
|
|
|
#include <QRegularExpression>
|
2020-05-10 12:45:19 +02:00
|
|
|
#include <QString>
|
2022-09-16 23:15:28 +02:00
|
|
|
#include <QStringList>
|
2020-05-10 12:45:19 +02:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2022-09-16 23:15:28 +02:00
|
|
|
extern const QStringList VALID_HELIX_COLORS;
|
|
|
|
|
2020-05-10 12:45:19 +02:00
|
|
|
void openTwitchUsercard(const QString channel, const QString username);
|
|
|
|
|
2022-02-12 15:06:47 +01:00
|
|
|
// stripUserName removes any @ prefix or , suffix to make it more suitable for command use
|
|
|
|
void stripUserName(QString &userName);
|
|
|
|
|
|
|
|
// stripChannelName removes any @ prefix or , suffix to make it more suitable for command use
|
|
|
|
void stripChannelName(QString &channelName);
|
|
|
|
|
2022-05-08 12:27:25 +02:00
|
|
|
// Matches a strict Twitch user login.
|
|
|
|
// May contain lowercase a-z, 0-9, and underscores
|
|
|
|
// Must contain between 1 and 25 characters
|
|
|
|
// Must not start with an underscore
|
|
|
|
QRegularExpression twitchUserLoginRegexp();
|
|
|
|
|
|
|
|
// Matches a loose Twitch user login name.
|
|
|
|
// May contain lowercase and uppercase a-z, 0-9, and underscores
|
|
|
|
// Must contain between 1 and 25 characters
|
|
|
|
// Must not start with an underscore
|
|
|
|
QRegularExpression twitchUserNameRegexp();
|
|
|
|
|
2022-09-16 23:15:28 +02:00
|
|
|
// Cleans up a color name input for use in the Helix API
|
|
|
|
// Will help massage color names like BlueViolet to the helix-acceptible blue_violet
|
|
|
|
// Will also lowercase the color
|
|
|
|
void cleanHelixColorName(QString &color);
|
|
|
|
|
2020-05-10 12:45:19 +02:00
|
|
|
} // namespace chatterino
|