Skip to content

Releases: DiscordLabSCP/DiscordLab

v2.6.1 - Fixing outdated info

05 Mar 17:42

Choose a tag to compare

heyo again!

This fixes a bug where translations would be built too late, causing information to be out of date...

Many thanks to @OMEGA3065 for bringing this to my attention (and subsequently making a pull request to fix it)

v2.6.0 - Optimisations!

04 Mar 16:23

Choose a tag to compare

heyo, in this update there is a lot of optimisations in place, also a fix for crashing too...

Features:

  • Added hidden config option translated_fields which allows you to select what fields should be translated, by default this is set to translated_fields: Message, EmbedDescription, EmbedFieldValues, EmbedFooterText if it doesn't appear. Soon after this update I will add to the documentation the values you can put here.
  • Added timestamp property to embed configurations, if timestamp: true then a timestamp will be generated in the footer of the embed using the user's local time.
  • Added RegexExtensions.CheckAndReplace which is a Func<string> version of Regex::Replace(). It will check the regex first, and if it matches it will replace.

Fixes:

  • Fixed servers crashing when building translations. This was because sometimes the translations were built on a separate thread to Unity, and once it tried to get the Unity related things, unity went nuh uh and crashed.

v2.5.0 - Silly bugs!

15 Feb 10:40

Choose a tag to compare

heyo, some annoying bugs have been fixed here, but hopefully there is no more bugs after this (I know I'm about to get 10000000 DMs saying there is issues, so ima have fun...)

Features:

  • Added command success/failure logs #18
  • Added warhead enabled/disabled logs
  • Added escape logs

Fixes:

  • Fixed no update subcommand on the /discordlab command
  • Fixed no update subcommand listed on the local admin discordlab command
  • Fixed update subcommand breaking when auto update is disabled.
  • Fixed Unknown being listed when no command arguments #18
  • Fixed errors being thrown too late in the tree when something is weirdly null/undefined
  • Fixed no try catch on CallOnReadyAttribute when loading after the bot is already ready
  • Fixed invalid command names in command logs

v2.4.0 - Exceptions... gone!

09 Feb 22:37

Choose a tag to compare

Hello! Today I fixed multiple issues, but added some features that developers and hosts will like.

Also, to fix an issue where sending a long error to error logs, I had to make it so a file was uploaded now instead of the text otherwise it can become too long then Discord will become annoying in the logs and start spamming the console with repeated errors. So please bear that in mind if you notice a parameter not getting replaced. Also to send errors to me, please don't send the file, just take a screenshot of the error or if you have Discord Nitro, copy and paste the error into chat with a code block.

As for the whole list, here:

Features:

  • Added a hidden config to the main bot, message_cache_size, only change this when you need to, otherwise it might start taking up lots of RAM, to understand what this parameter does, refer to the Discord.Net documentation.
  • Added a file to the error log to replace the plain text errors.
  • Added message length checks when sending messages. Tells you where you have a message that is too long.

Fixes:

  • Fixed double error when long exceptions when error logs is enabled.
  • Fixed inconsistent update notification message
  • Stopped DiscordLab.BotStatus from throwing an error when setting the status of the bot. This is a weird side effect of Discord.Net
  • Fixed sending message errors telling you the obvious location of the error, rather than the starting point.
  • Hidden a useless error that just told you something got disposed before it was used.
  • Fixed an issue where if your plugin enables after the bot is ready, the CallOnReady attribute would never get called.
  • Fixed NullReferenceExceptions when using replacers.
  • Hidden certain warnings in console which are useless and annoying

v2.3.0 - Optimisations

04 Feb 17:38

Choose a tag to compare

Heyo! Since the last update I have had so many support requests of people confused why the bot just wasn't working anymore, and I was hella confused too... before I realised I was actually muting the errors in a bit of my code, so with this update I've made it so debugging stuff is 100000x easier for me (and most likely you)

Also, there is a fix with damage log spam causing so many rate limits to be triggered, for this though it requires you download a new dependency otherwise damage logs will now cease to work, sorry! It is packaged below.

Here are the full updates:

Features:

  • You can force an update via command now. Before /discordlab check would only update if auto updating was enabled, now if you have auto update disabled, you can run /discordlab update and everything will force update, ignoring that flag
  • Dummies are now hidden from join/leave logs if said dummies are hidden from the player list
  • Damage logs now uses webhooks to send logs instead of the bot, avoiding rate limits.
  • Packaged Discord.Net.Webhook into DiscordLab.Bot so you can now play around with webhooks if you feel the need.

Fixes:

  • Fixed SCP-173 deaths being Unknown in damage/death logs
  • Fixed SCP-127 deaths/damage being Unknown in damage/death logs
  • Silent crashing whenever the bot didn't have the right permissions/intents

v2.2.1 - Fixing error loop!

28 Jan 08:56

Choose a tag to compare

Heyo, thanks for your patience on this one!

This fixes an issue where if you have DiscordLab.Administation with error logging enabled, you'd probably get hit with constant errors, causing an error loop because of timeout errors, sending error, getting a timeout error, etc...

Other fixes include:

  • Fixed Damage Logs sometimes not sending
  • Using wrong event for banning a person so the player couldn't be fetched correctly, if there was one.
  • Fixed sometimes not getting the class name when getting the full name of a class and method combo via our GetFullName utility

Features:

  • Added more logging utilities
  • Added onException parameter to Task.RunAndLog(), allows you to override the default behaviour when there is an exception
  • Made errors more understandable for fixing when sending a message, you can see where the error is thrown from.

Obsoleted:

  • CallOnLoadAttribute.LogLoadException and CallOnLoadAttribute.GetFullName, use their counterparts in LoggingUtils, named the same.

v2.2.0 - Auto update!

05 Jan 14:36

Choose a tag to compare

For some reason I never actually tested auto-update when I made it initially, so now that I have tested it and fixed everything, I did notice some flaws which have also been fixed.

Also I added some new features and other bug fixes in this release, the whole list is here:

Features:

  • You can now add parameters into embed footers! It is no longer locked to fields and description.
  • Added static extension method Task.RunAndLog() (Available in DiscordLab.Bot.API.Extensions.TaskExtensions) which allows for running and logging tasks without writing your own try-catch block in code.
  • Added better debug logging for CallOnX attributes
  • Added better exception logging for CallOnX attributes

Fixes:

  • Auto-updater now actually auto-updates.
  • Auto-updater doesn't delete the old plugin if the new one doesn't successfully download.
  • Fixed some silent errors being thrown going to and from Discord. These errors will no longer be silent and will appear in console if they do happen.
  • Fixed a rare confusing error from showing that occurs if you have conflicting dependencies. Whilst the error is not actually fixed, it should now tell you why it got thrown.
  • Fixed an issue with DiscordLab.DeathLogs damage logs showing unknown regularly.

v2.1.0 - A new feature with bug fixes!

03 Nov 14:50

Choose a tag to compare

Features:

  • Added admin chat logs
  • No more DiscordLab.Dependency needed!
  • New alias for the discordlab LA 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 GetOption not working with number options.
  • Fixed the error related to duplicated commands

Technical changes:

  • Changed solution type from SLN to SLNX

v2 release

23 Aug 09:36
3ee5c19

Choose a tag to compare

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:

  • SocketClient is now available in the root namespace of DiscordLab.Bot, it is also static, you can access it from DiscordLab.Bot.Client.SocketClient. The Client class also has loads of useful utility methods
  • Added attributes CallOnLoad, CallOnUnload and CallOnReady accessible via DiscordLab.Bot.API.Attributes
  • Added embed configuration classes, EmbedBuilder and more, accessible via DiscordLab.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.MessageContent which 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.TranslationBuilder which 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

20 Aug 07:44
9439665

Choose a tag to compare

v2 Beta 3 Pre-release
Pre-release

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.MessageContent which 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:

  • MessageContent related features:
    • MessageContent::SendToChannel(SocketTextChannel, TranslationBuilder) - Sends a message to the given channel
    • MessageContent::SendToChannelAsync(SocketTextChannel, TranslationBuilder) - Sends a message to the given channel using a Task
    • MessageContent::ModifyMessage(IUserMessage, TranslationBuilder) - Edits a message
    • MessageContent::InteractionRespond(SocketCommandBase, TranslationBuilder) - Responds to an interaction
    • MessageContent::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.
  • TranslationBuilder has 2 new parameters: minutessince and secondssince which will calculate either the minutes or seconds since round start using the Time parameter as offset
  • TranslationBuilder::Translation can now be edited
  • TranslationBuilder can be created with no properties now
  • TranslationBuilder.Build(string) now exists, string is optional, it will use TranslationBuilder::Translation if given.
  • {reason} parameter given to DiscordLab.Moderation ban 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