コード例 #1
0
ファイル: UserMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendLogout(HitboxChat client, string name)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"partChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"name\":\"").Append(name);
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
コード例 #2
0
ファイル: ChatMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendRemoveMod(HitboxChat client, string channel, string name, string token)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"removeMod\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
コード例 #3
0
ファイル: UserMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendChatMessage(HitboxChat client, string channel, string name, string nameColor, string text)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"chatMsg\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"nameColor\":\"").Append(nameColor).Append("\",");
            sb.Append("\"text\":\"").Append(text);
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
コード例 #4
0
ファイル: UserMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendJoinRequest(HitboxChat client, string channel, string name, string token, bool notify, bool isAdmin)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"joinChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"notify\":").Append(notify.ToString().ToLower()).Append(",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"isAdmin\":").Append(isAdmin.ToString().ToLower()).Append(",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
コード例 #5
0
ファイル: ChatMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendSlowSubMode(HitboxChat client, string channel, int time, bool sub)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"slowMode\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            if (!sub)
                sb.Append("\"time\":").Append(time).Append(",");
            sb.Append("\"subscriber\":\"").Append(sub);
            if (sub)
            {
                sb.Append("\",");
                sb.Append("\"sub\":").Append(0);
            }
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
コード例 #6
0
ファイル: UserMessages.cs プロジェクト: Hitakashi/hitaBot-WS
        public static void SendUserList(HitboxChat client, string channel)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"getChannelUserList\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower());
            sb.Append("\"}}]}");

            //Logger.Info("[[email protected]" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }