Skip to content

Releases: DiscordLabSCP/DiscordLab

v2 14.1.3 fix

06 Aug 09:56

Choose a tag to compare

v2 14.1.3 fix Pre-release
Pre-release

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

14 Jul 19:13

Choose a tag to compare

Pre-release

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.
  • There is now bitwise extensions that may be useful, only one as of yet which is GetFlags which 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 EmbedBuilder class 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 SlashCommand and AutocompleteCommand classes now exist. To register a command just run FindAll under SlashCommand and it will find every command and autocomplete command for you, and register.
  • A new TranslationBuilder class 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 command
    • LoggingUtils.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

14 Jun 18:01

Choose a tag to compare

Features:

  • Adds check subcommand 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

14 Jun 18:06

Choose a tag to compare

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

11 Jun 15:52

Choose a tag to compare

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.Commands has been changed from List to BindingList, this allows for list based events, useful for command loading

Features:

  • Added DiscordBot::CreateGuildCommand which 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::IsReady which is true after the Ready event 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

10 Jun 16:16

Choose a tag to compare

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

10 Jun 17:09

Choose a tag to compare

Fixes an issue where errors would spam the console if a channel was set but failed to be found or otherwise.

DiscordLab.Bot v1.5.4

12 May 21:10

Choose a tag to compare

Developer QoL update:

Features:

  • Adds interface IAutocompleteCommand which when added, allows you to add an Autocomplete function that DiscordLab will recognise
  • Adds an abstract class SlashCommand which allows you to create commands via an abstract method, inherits IAutocompleteCommand so you can also add autocompletes, but it is not required.
  • Packages Discord.Net.Core, Discord.Net.Rest and Discord.Net.Websocket, Websocket is the most useful as now commands can use it without having to package Discord.Net.Websocket for their plugins

Internal updates:

  • Internal command changes to use IAutocompleteCommand if needed, rather than manually coding them in.

DiscordLab.Bot v1.5.3

10 Mar 14:24

Choose a tag to compare

Changes the way tokens are checked so now invalid tokens are logged in the right way, that's it.

v1.5.2

30 Jan 08:36

Choose a tag to compare

Features:

  • Player prefix with no suffix defaults to nickname
  • Auto updater now deletes any files that match the module name that needs to be updated, i.e. if you have a ModerationLogs update needed, it will delete anything that starts with DiscordLab.ModerationLogs and then upload the new version.
  • DiscordLab default commands now no longer require the DiscordLab. suffix when installing, it also is no longer caps sensitive.
  • Better log management, some useless logs are now not logged.

Technical Changes:

  • HandleLoader.Load now no longer requires your assembly, it can just find your assembly from when you call it.
  • Added new API extensions and enums
    • ChannelReturn
    • GuildReturn
    • TryGetGuild (using Client)
    • TryGetTextChannel (using Client)
    • TryGetTextChannel (using Guild)