#UncomplicatedDiscordIntegration

56 messages · Page 1 of 1 (latest)

candid meteor
#

What's UncomplicatedDiscordIntegration?
UncomplicatedDiscordIntegration, also known as UDI is a remake of the plugin DiscordIntegration (https://github.com/ExMod-Team/DiscordIntegration) created by Joker.

Features

  • Log everything to your Discord server
    You'll be able to receive every log message sent in youur server console directly from Discord!
  • No need for an external bot!
    You heard it right!
    The bot is integrated inside the plugin thanks to SimpleDiscord, so you won't have to start an external thing somewhere!
  • Watchlist
    Keep an eye on suspicious users through UDI's watchlist!
    Get notified when a user on the watchlist enters via message on Discord and via broadcast, showing the reason as well!
  • Fully customizable
    The configurations allow you to customize virtually every aspect of the bot, the plugin, and even the posts!

EXILED Version: >= 8.12.0

⚠️
SimpleDiscord (https://github.com/UncomplicatedCustomServer/SimpleDiscord) is required as a dependency!

GitHub Repository: https://github.com/UncomplicatedCustomServer/UncomplicatedDiscordIntegration
Latest release: https://github.com/UncomplicatedCustomServer/UncomplicatedDiscordIntegration/releases/latest
Official discord support server: discord.gg/dpvHzC5mst

mint flax
#

I think this will boost servers by high amount

delicate pivot
#

-rep not much links to discord and authors

#

give instead tag group with all permissions to authors of plugin thanks

mint flax
#

Nah I just think this man did not look at the plugin and just said this...

delicate pivot
#

божeтупыeanгаличанeнeшapятзapoфлы

mint flax
#

Bunch of russian letters that's all I see

#

Don't understand them

delicate pivot
#

i need to create uncomplicated uncomplicated discord integration and remove all links to discord server and credit tag

#

💥

mint flax
candid meteor
#

don't you think that maybe because the product was released to everyone for free and open source, you shouldn't do that?

candid meteor
candid meteor
#

with the same license and to everyone

candid meteor
tiny pine
#

womp womp

heavy warren
#

@candid meteor```c#
using System.Threading.Tasks;
using SimpleDiscord;
using SimpleDiscord.Components;
using SimpleDiscord.Components.Builders;
using SimpleDiscord.Enums;
using SimpleDiscord.Events.Attributes;
using SimpleDiscord.Gateway;
using SimpleDiscord.Logger;
using Log = Exiled.API.Features.Log;

namespace Core.Features.Discord;

public class DiscordStatusBot(string Token, string statusString)
{
public Client Client;
public long Start;

public void Run()
{
    try
    {
        Client = new Client(new ClientConfig
        {
            SaveGuildRegisteredCommands = false,
            SaveMessages = false,
            FetchThreadMembers = false,
            LoadMembers = true,
            LoadAppInfo = false,
            Debug = true
        });
        Client.Logger.SubstituteLogHandler = (LogEntry log) =>
        {
            switch (log.Level)
            {
                case LogLevel.Debug:
                    Log.Debug(log.Content);
                    break;
                case LogLevel.Info:
                    Log.Info(log.Content);
                    break;
                case LogLevel.Warn:
                    Log.Warn(log.Content);
                    break;
                case LogLevel.Error:
                    Log.Error(log.Content);
                    break;
            }

            return log.Level is LogLevel.None;
        };
        Client.EventHandler.RegisterEvents(this);
        Start = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
        Client.LoginAsync(Token, Gateway.allIntents);
        Log.Info("Logging into discord bot...");
    }
    catch (Exception e)
    {
        Client.Logger.Error(e.ToString());
    }
}

[SocketEvent("READY")]
public async void Ready()
{
    Log.Info("Ready");
    UpdateStatus();

    await Task.Delay(5000);
}

public async void UpdateStatus()
{
    while (Client.ConnectionStatus is ConnectionStatus.Connected or ConnectionStatus.Connecting)
    {
        Log.Info("Updating status actor");
        Client.Presence = new SocketSendPresence([
            ActivityBuilder.New(statusString
                    .Replace("%current%", Player.List.Count.ToString())
                    .Replace("%total%", Server.MaxPlayerCount.ToString()))
                .SetType(ActivityType.Watching)
                .SetDetails("jadelib")
                .SetCreatedAt(Start)
        ], Player.List.Count switch
        {
            0 => "idle",
            _ => "online"
        });
        await Task.Delay(1500);
    }
}

}```
Any ideas why the bot does not come online at all i know its the correct token

candid meteor
candid meteor
heavy warren
# candid meteor yeah ofc
public override void OnEnabled()
    {
        Server.EndingRound += RoundEnd;
        Server.RoundStarted += RoundStart;
        Jade.Initialize();
        new FeatureGroup("main").Supply(new MainEvents()).Supply(new SpectatorReplaceEvents()).Register();
        Lobby.Lobby.Register();
        ScpReplacer.Enable();
        RoundUtils.ChaosCountFunction = () =>
        {
            return Round.IsLobby ? 9999 : Player.List.Count(e => e.IsAlive && !e.IsScp);
        };
        var discordStatusBot = new DiscordStatusBot("",
            "%current%/%total% players online");
        discordStatusBot.Run();
    }```
candid meteor
heavy warren
#

oh

#

cause its async?

candid meteor
#

ig that you can also do Task.Run(discordStatusBot.Run); instead of Task.Run(() => discordStatusBot.Run()); but I'm not sure

candid meteor
heavy warren
candid meteor
heavy warren
# candid meteor 👍

also when using your plugin

[WARN] [UncomplicatedDiscordIntegration] Failed to create a remote database on UCS@FoxBase!
It seems that you've exceeded the database limit, please contact us as soon as possible!
FoxBase says: MethodNotAllowed

candid meteor
lusty timber
#

[UncomplicatedDiscordIntegration] Failed to act HttpManager::LoadCreditTags() - Newtonsoft.Json.JsonSerializationException: Error converting value 404 to type 'System.Collections.Generic.Dictionary`2[System.String,System.String]'. Path 'status', line 1, position 13.

candid meteor
lusty timber
#

this mod will have a update?

#

@candid meteor

candid meteor
lusty timber
#

nice

lusty timber
candid meteor
lusty timber
#

👍

solemn snow
#

It don't create the config file

#

@candid meteor

#

Sorry for the ping

#

Idk if i am allowed to ping u

candid meteor