EHS/include/ehs/io/socket/rest/TwitchChat.h
karutoh 1a4a1ecd9c
Some checks failed
Build & Release / Linux-x86_64-Build (push) Successful in 40s
Build & Release / Linux-AARCH64-Build (push) Has been cancelled
First commit.
2024-01-31 22:28:19 -08:00

53 lines
801 B
C++

#pragma once
#include "ehs/EHS.h"
#include "ehs/Str.h"
#include "ehs/io/socket/TCP.h"
namespace ehs
{
class TwitchChat
{
private:
TCP client;
Str_8 username;
Str_8 token;
Str_8 channel;
bool initialized;
public:
~TwitchChat();
TwitchChat();
TwitchChat(const Str_8& username);
TwitchChat(const Str_8& username, const Str_8& token);
TwitchChat(const TwitchChat& chat);
TwitchChat& operator=(const TwitchChat& chat);
void SetToken(const Str_8& newToken);
void Initialize();
void UnInitialize();
void JoinChannel(const Str_8& newChannel);
void LeaveChannel();
void SendPong();
void SendMsg(const Str_8& msg);
void WhisperMsg(const Str_8& user, const Str_8& msg);
Str_8 RecvMsg();
Str_8 GetUsername() const;
Str_8 GetChannel() const;
};
}