1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 00:19:00 +03:00
A general-purpose Discord bot for moderation written in C#
Find a file
Octol1ttle a326adb680
Fix Reminder serialization/deserialization (#166)
Closes #124 

Before we dive into this PR, let's explain a few rules of serialization
and deserialization in System.Text.Json (often referred as STJ).

The important rule of serialization is that fields are ***not***
serialized unless the serializer gets passed an instance of
`JsonSerializerOptions` that explicitly tells it to include fields.
However, properties are serialized by default.

The important rule of ***de***serialization is that class members are
only deserialized if:
1) In case of properties, they must have a setter
2) If they do not have a setter, the constructor must have an argument,
required or optional, that will act as the setter for that property.

Unfortunately, both of these rules were ignored in some commit that
refactored reminders. This PR is here to fix that issue by:
1) Converting fields in `Reminder.cs` to properties
2) Adding an optional argument to the `MemberData` constructor
2023-10-17 17:01:24 +05:00
.github Correct issue label names per recent changes (#160) 2023-10-12 17:44:13 +03:00
CodeAnalysis Fix JSON corruption when saving (#100) 2023-08-22 07:46:57 +00:00
docs Add building & running instructions (#148) 2023-10-04 18:18:59 +03:00
locale /remind: Switch away from zero-based numbering and rename index (#155) 2023-10-06 14:17:48 +00:00
src Fix Reminder serialization/deserialization (#166) 2023-10-17 17:01:24 +05:00
.editorconfig Add automatic deployment (#90) 2023-08-14 13:24:20 +00:00
.gitignore Update .gitignore (#150) 2023-10-04 21:49:21 +05:00
LICENSE Seal all possible classes, add LICENSE, follow async naming conventions 2022-09-18 19:41:29 +05:00
Octobot.csproj Rebrand to Octobot (#128) 2023-09-30 18:58:32 +05:00
Octobot.sln Rebrand to Octobot (#128) 2023-09-30 18:58:32 +05:00

Octobot banner

Veemo! I'm a general-purpose bot for moderation (formerly known as Boyfriend) written by Labs Development Team in C# and Remora.Discord

Features

  • Banning, muting, kicking, etc.
  • Reminding you about something if you wish
  • Reminding everyone about that new event you made
  • Renaming those annoying self-hoisting members
  • Log everything from joining the server to deleting messages
  • Listen to music!

...a-a-and more!

Running Octobot

  1. Install .NET 7 SDK
  2. Go to the Discord Developer Portal, create a new application and get a bot token. Don't forget to also enable all intents!
  3. Clone this repository and open Octobot folder.
git clone https://github.com/LabsDevelopment/Octobot
cd Octobot
  1. Run Octobot using dotnet with BOT_TOKEN variable.
dotnet run BOT_TOKEN='ENTER_TOKEN_HERE'

Contributing

When it comes to contributing to the project, the two main things you can do to help out are reporting issues and submitting pull requests. Please refer to the contributing guidelines to understand how to help in the most effective way possible.

Special Thanks

JetBrains Logo (Main) logo

JetBrains, creators of ReSharper and Rider, supports Octobot with one of their Open Source Licenses. Rider is the recommended IDE when working with Octobot, and everyone on the Octobot team uses it. Additionally, ReSharper command-line tools made by JetBrains are used for status checks on pull requests to ensure code quality even when not using ReSharper or Rider.

Not an official Splatoon™ product. We are in no way affiliated with or endorsed by Nintendo Company, or other rightsholders.