In this PR, I made the logo link in /about use HEAD instead of hardcoded
branch.
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
PR's name speaks for itself. It might also be useful to update the logo
more easily.
---------
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
This PR has been opened to finally update Octobot's Wiki.
Current changes summary:
- correct minor spelling issues in some command descriptions
- /about: add Octobot's Wiki button
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This feature will improve the debugging experience for developers by
providing the information about *where exactly* a result has failed
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
In this PR, I'm disabling the Report Issue button if a "dirty" version
is detected. This is done just in case so that "smart" developers don't
accidentally report a bug that they themselves created.
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
In this PR, I added a NuGet package called GitInfo. It can replace
Octobot.RepositoryUrl and display the bot version as the current branch
and commit.
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
In this PR, I made it so that in the Author field instead of the
hardcoded name was the name of the Discord bot. This was done to match
the icon next to it in the same field.
Replaces #224
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
ReSharper inspections have been updated, causing new warnings to appear
in the codebase. This time, the "Use collection expressions" inspection
has been enabled for usecases where the collection is not empty. This PR
fixes the check failures caused by this inspection.
In this PR, the behavior of the developer list display in /about has
been changed. Now, if a developer is not on the same server where the
/about command was executed, their username will have a link to their
GitHub profile.
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
In this PR, I've added a "Report an issue" button and a few more
button-related changes:
- Add "Report an issue" button
- Add icon for "Octobot's source code"
- Rename `AboutTitleRepository` to `ButtonOpenRepository`
- Rename `OpenEventInfoButton` to `ButtonOpenEventInfo` to be consistent
with other language string names
- Rename `ColorsList.cs` to `Miscellaneous.cs`
- Add public const strings in `Octobot.cs` to get repository & issues links
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
In this PR, I moved the repository link from the embed to a button in
/about command for better UI/UX
---------
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
In this PR, I have added StringBuilder extensions to avoid `.Append`
reuse such as `.Append("- ").AppendLine()`
Closes #205
---------
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This PR replaces usages of the `FeedbackService` implementation with the
`IFeedbackService` interface. Using concrete implementations breaks the
whole point of dependency injection, so it doesn't make sense to use
them
This PR splits the extension methods contained in `Extensions.cs` into
separate classes in the `Octobot.Extensions` namespace. This was done
for multiple reasons:
1) The `Extensions.cs` violates SRP (Single Responsibility Principle) -
it takes upon itself every extension method for many types
2) Having a separate class for each extended type is a standard practice
- take a look at
[Remora.Discord](https://github.com/Remora/Remora.Discord/tree/main/Backend/Remora.Discord.Rest/Extensions)
or [osu!](https://github.com/ppy/osu/tree/master/osu.Game/Extensions)
3) Having all extension methods in one file makes it hard to find the
method you want
note: there are still instances of `IUser user` because I could not find
a better name for them
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
We're moving!
---------
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
*I'll start working on features and bugfixes after this PR, I promise*
very short summary:
- no more braceless statements
- braces are on new lines now
- `sealed` on everything that can be `sealed`
- no more awkwardly looking alignment of fields/parameters
- no more `Service` suffix on service fields. yeah.
- no more `else`s. who needs them?
- code style is now enforced by CI
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This PR removes the wrapping of in-house created result errors with
`Result.FromError` (I did not know this was possible until today, lol),
which reduces code verbosity and makes it easier to read, and replaces
`ArgumentNullError` with `ArgumentInvalidError` when retrieving IDs from
a command context, which, in my opinion, is more correct.
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This PR uses a new feature of the InspectCode action: extensions. By
adding the `Cognitive Complexity` extension, InspectCode can provide
warnings and force the contributors to follow standards regarding
complex methods. This functionality was previously provided by
CodeFactor, but it is no longer used. Here's the full changelog of this
PR:
- Allowed Actions to run on push for any branch, not just `master`;
- Added `Cognitive Complexity` plugin for InspectCode;
- Significantly reduced complexity of KickCommandGroup, MuteCommandGroup
and GuildUpdateService
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This PR does numerous things to reduce method complexity:
- Created an extension method
`FeedbackService#SendContextualEmbedResultAsync`, which directly takes a
`Result<Embed>` and checks it once in the extension method instead of
multiple times in all commands;
- Split the command methods for `/ban` and `/unban` into 2 parts:
`Execute(Un)Ban` and `(Un)BanUserAsync`. The former will check all the
needed results and will pass the outputs into the latter;
- Extracted the method for logging an action into Private- and
PublicFeedbackChannels. It now resides in UtilityService. Right now,
only `/ban` and `/unban` make use of that method;
- Created an extension method `Snowflake#EmptyOrEqualTo`, that combines
the task of checking if a Snowflake is empty and checking if that
Snowflake is equal to another Snowflake.
Similar changes will be made to other command groups in future PRs. This
is not done here to make the reviewing process easier.
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This PR prevents usage of `/about`, `/ping` and `/remind` inside DMs.
While it may look like these commands do not require a guild attached to
them, the language system depends on having a guild to fetch settings
from, so it is not possible to use these commands in DMs.
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
mctaylors:
- updated readme 7 times (and only adding new logo from /about)
-
[removed](aeeb3d4399)
bot footer from created event embed on the second try
-
[changed](4b9b91d9e4)
cdn from discord to upload.systems
Octol1ttle:
- Guild settings code has been overhauled. Instead of instances of a
`GuildConfiguration` class being (de-)serialized when used with listing
and setting options provided by reflection, there are now multiple
`Option` classes responsible for the type of option they are storing.
The classes support getting a value, validating and setting values with
Results, and getting a user-friendly representation of these values.
This makes use of polymorphism, providing clean and easier to use and
refactor code.
- Gateway event responders have been split into their own separate
files, which should make it easier to find and modify responders when
needed.
- Warning suppressions regarding unused and never instantiated classes
have been replaced by `[ImplicitUse]` annotations provided by
`JetBrains.Annotations`. This avoids hiding real issues and provides a
better way to suppress false warnings while being explicit.
- It is no longer possible to execute some slash commands if they are
run without the correct permissions
- Dependencies are now more explicitly defined
neroduckale:
- Made easter eggs case-insensitive
---------
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: nrdk <neroduck@vk.com>
The project structure has been changed because the previous one had
everything in 1 folder. From this PR onwards, the following is true:
- The source code is stored in `src/`
- `*.resx` and `Messages.Designer.cs` is stored in `locale/`
- Documentation is stored on the wiki and in `docs/`
- Miscellaneous files, such as dotfiles, are stored in the root folder
of the repository
This PR additionally fixes an issue that would cause logs of edited
messages to not be syntax highlighted. This happened because the
responder of edited messages was changed to use the universal
`InBlockCode` extension method which did not support syntax highlighting
until this PR
This PR additionally changes CODEOWNERS to be more reliable. Previously,
it would be possible for some PRs to be unable to be approved because
the only person who can approve them is the same person who opened the
PR.
---------
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-09 22:36:44 +05:00
Renamed from Commands/AboutCommandGroup.cs (Browse further)