Releases: DiscordLabSCP/DiscordLab
v2.1.0 - A new feature with bug fixes!
Features:
- Added admin chat logs
- No more DiscordLab.Dependency needed!
- New alias for the
discordlabLA command - Changed some default translations to give more information that may be useful to have at a default scale.
Fixes included in this release:
- Fixes some events not getting unsubscribed correctly.
- Fixed ban reason not being replaced.
- Fixed unmute command not having the correct replacement parameters set.
- Fixed not checking for if the role actually changed in SCP Swap, causing spam sometimes.
- Fixed DateTime being null in some cases, causing date translations being broken.
- Fixed API method
GetOptionnot working with number options. - Fixed the error related to duplicated commands
Technical changes:
- Changed solution type from SLN to SLNX
v2 release
Welcome to DiscordLab v2
DiscordLab is now a LabAPI plugin, it is no longer an EXILED plugin, please be aware of this fact.
New installation guide:
The new documentation for v2 is already live, go to https://discordlab.jxtq.moe to learn more!
List of things that changed:
- Modules got merged together
- Added custom messages
- Added more logs
- Simpler API
- and much more!
Merged Modules:
- Moderation and ModerationLogs merged into Moderation
- SCPSwap merged into round logs
Removed Modules:
- XPSystem
- AdvancedLogging
(XPSystem is Exiled and Advanced logging was a bit tricky to move over, I might potentially make my own system for it in future, but there is no plans as of yet)
List of new API features:
SocketClientis now available in the root namespace of DiscordLab.Bot, it is also static, you can access it fromDiscordLab.Bot.Client.SocketClient. TheClientclass also has loads of useful utility methods- Added attributes
CallOnLoad,CallOnUnloadandCallOnReadyaccessible viaDiscordLab.Bot.API.Attributes - Added embed configuration classes,
EmbedBuilderand more, accessible viaDiscordLab.Bot.API.Features.Embed, these hide optional fields if not in use inside of configs - Changed slash commands from interfaces to abstract classes, makes it easier to register commands.
- Added
DiscordLab.API.Features.MessageContentwhich allows a user to easily set what should be sent to Discord, also comes with utility methods to send these messages. - Added
DiscordLab.API.Features.TranslationBuilderwhich makes it easy to replace placeholders and make your own custom ones. - Added multiple utility classes with utility methods inside, available in
DiscordLab.API.Utilities - and much more, check out the new code!
Thanks for the support!
v2 Beta 3
This version includes breaking changes since the last version, here is the full list:
Breaking changes:
- DiscordLab root (DiscordLab.Bot) is now nullable, some stuff would have changed, probably will need to recompile plugins
- Introduced
Bot.API.Features.MessageContentwhich replaces message translations to allow for embeds and plain message content in your logs. The features this adds will be added in the features.
Features:
MessageContentrelated features:MessageContent::SendToChannel(SocketTextChannel, TranslationBuilder)- Sends a message to the given channelMessageContent::SendToChannelAsync(SocketTextChannel, TranslationBuilder)- Sends a message to the given channel using a TaskMessageContent::ModifyMessage(IUserMessage, TranslationBuilder)- Edits a messageMessageContent::InteractionRespond(SocketCommandBase, TranslationBuilder)- Responds to an interactionMessageContent::ModifyInteraction(SocketCommandBase, TranslationBuilder)- If you've deferred a response, or already sent a response, this will edit that response.- All of the above methods will check the content inside of the class, i.e. if they have an embed or message content, or both and then send that content to Discord using the given method.
TranslationBuilderhas 2 new parameters:minutessinceandsecondssincewhich will calculate either the minutes or seconds since round start using theTimeparameter as offsetTranslationBuilder::Translationcan now be editedTranslationBuildercan be created with no properties nowTranslationBuilder.Build(string)now exists, string is optional, it will useTranslationBuilder::Translationif given.{reason}parameter given toDiscordLab.Moderationban logs- Extension method
Bot.API.Extensions.DiscordExtensions.GetOption<T>(this IReadOnlyCollection<SocketSlashCommandDataOption>, string)has been introduced, makes it cleaner to get options.
Made some extra optimization changes as well. This release will probably be a release candidate.
Full Changelog: 2.0.0-beta2...2.0.0-beta3
v2 14.1.3 fix
Release to fix issues with v14.1.3 of SCP:SL. Only bot broke so I will only upload bot. The rest of the modules still work on 2.0.0-beta1 release
v2.0 prerelease version
Welcome to DiscordLab v2.0, the biggest refactor for a plugin I've ever made (admittedly this is the largest plugin I've worked on to date but yeah)
The plugin is now LabAPI exclusive, no EXILED version will be made.
This update includes breaking changes everywhere, adds new features, fixes bugs, and more. It still uses the underlying technology of Discord.Net but to fix some of the issues, I had to change how some of the stuff works.
To download, you can download any of the modules from below, they should work very similarly to how they did in v1.x but will have different names now.
You are also required to download the dependencies.zip folder and extract that in LabAPI dependencies, not plugins.
Here are the name changes:
- DiscordLab.AdminLogs has been merged to make Administration, this module will now be used for any administrative purposes and logging
- DiscordLab.AdvancedLogging has been removed temporarily and may not make it in the first release.
- DiscordLab.ModerationLogs has been merged with Moderation, Moderation also now has an in-built temporary mute command for Discord and for SL, so if you don't have a moderation system that handles temporary mutes already, you can utilize this system.
- DiscordLab.SCPSwap has been merged into RoundLogs
- DiscordLab.XPSystem has been removed as it didn't seem like a very popular module and I only added it because someone requested. If you want this module to be remade, let me know and I may make it external.
These updates were done to make the developer experience better when developing modules and stuff, and also for user experience.
Assume everything is breaking, here are the changes you must know about as a developer:
- The bot client has now been moved to the root namespace of DiscordLab.Bot, it is also a static class so you don't need to access instance.
- There is now attributes that replace the IRegister interface. These are better as they can be run on static methods. The attributes are:
- CallOnLoad -
CallOnLoadAttribute.Load()will find all attributes of this type and load them whenever this is called. - CallOnUnload -
CallOnUnloadAttribute.Unload()will find all attributes of this type and call the method that is found. - CallOnReady -
CallOnReadyAttribute.Load()will find all attributes of this type and run the methods whenever the bot is ready, this is useful for caching stuff.
- CallOnLoad -
- There is now bitwise extensions that may be useful, only one as of yet which is
GetFlagswhich just gets all the active flags on your flag list. - There is now Discord extensions which allow you to automatically run a Task.Run with SendMessageAsync for you, it is
SendMessage. - You can now put embed builders directly in translations with the
EmbedBuilderclass in DiscordLab.Bot.API.Features.Embed. - All commands now use abstract classes over interfaces because the static methods are a lot better to have then have 2 files for different things. So
SlashCommandandAutocompleteCommandclasses now exist. To register a command just runFindAllunderSlashCommandand it will find every command and autocomplete command for you, and register. - A new
TranslationBuilderclass has been made to make it easier than ever to make your own translations and add your own custom properties and players to it. - There is also now utilities classes which will most likely only be used in DiscordLab modules but they exist for your use too, these include:
CommandUtils.GetPlayerFromUnparsed()which is a method which allows you to get a player from their ID directly from a ICommand (basegame) if it's a required field in a commandLoggingUtils.GenerateMissingChannelMessage()which is a method that returns a string useful for logging a missing channel, or not found.
Hopefully this update is well received and hopefully has no bugs on initial release, I've done a considerable amount of testing for this one, so yeah. Thanks guys for your patience!
v1.6.1 release
Features:
- Adds
checksubcommand to the discordlab base commands. This now checks for updates rather than you having to restart your server twice! Only once now.
Fixes:
- Fixes an issue where the queue system wouldn't delete instances of the last sent item, making it so queue systems can never be called again. This will fix issues with stuff like BotStatus having weird statuses during the waiting for player stage.
Thanks!
DiscordLab.DeathLogs v1.6.0
Features:
- Adds damage logging capabilities, using embeds.
WARNING: for damage logging to work properly, you should have v1.6.1 of the main bot installed, otherwise damage logs will only send once. It isn't required but it would be silly not to update.
v1.6.0
It is recommended for all servers to update to this version for future releases as I am going to work on DiscordLab v2 very soon.
Breaking changes:
SlashCommandLoader.Commandshas been changed fromListtoBindingList, this allows for list based events, useful for command loading
Features:
- Added
DiscordBot::CreateGuildCommandwhich makes you able to create build commands whenever needed, and not only at plugin start, this was made as part of a fix. - Commands now will get automatically created when added to
SlashCommandLoader.Commands - Added
DiscordBot::IsReadywhich istrueafter theReadyevent is called on the bot, this means that data is cached and ready, this is better to use over checking if the bot is connected. - Added more debug logs in the case of request by me or other plugin developers in future.
Fixes:
- If a command gets added a bit too late, it can cause an error to be thrown when in the moment of command creation.
- If a pre-release or draft is made, DiscordLab will not install it, it will also be ignored so it won't show as the latest version.
- If the major version of a module is updated, it won't auto-install anymore, because these changes are major and probably won't work 1:1. For example, versioning is like this: major.minor.build, like 1.6.0 for this current version.
- Getting the wrong autocomplete command in some rare cases
- Correct documentation link is shown in some errors/warnings
DiscordLab.DeathLogs v1.5.1
Adds a new {cause} placeholder to all death related translations, make sure you back up your current translations just in case this update deletes them. If cause is not added, then you can add it yourself.
I am open to more suggestions! Thanks
DiscordLab.AdminLogs v1.0.2
Fixes an issue where errors would spam the console if a channel was set but failed to be found or otherwise.