Commit graph

253 commits

Author SHA1 Message Date
c825848d7e
Split error logging events into separate files (#51)
This PR splits `LoggingPreparationErrorEvent` and
`ErrorLoggingPostExecutionEvent` classes into separate files and puts
these files in a separate namespace: `Boyfriend.Commands.Events`. This
makes these classes easier to find and distinguish from commands groups.

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-19 21:01:53 +00:00
f97e99d82b
Increase thresholds for size labels (#52)
This PR adds a `labels.yml` file to configure the `pull-request-size`
bot. The new thresholds are:
- 0-9 lines for XS
- 10-49 lines for S
- 50-99 lines for M
- 100-499 lines for L
- 500-999 lines for XL
- \>1000 for XXL

In the file, these thresholds are doubled to accomodate for the fact
that both additions and deletions are counted (e.g. editing 10 lines
will result in 10 additions and 10 deletions, 20 in total)

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-19 21:00:11 +00:00
f75926c604
Do not allow certain commands to be used in DMs (#49)
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>
2023-07-18 14:18:35 +00:00
c6dd3727c3
The Milestone Commit (#48)
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>
2023-07-18 12:25:02 +00:00
3eb17b96c5
Tidy up project structure, fix bug with edit logging (#47)
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
2dd9f023ef
Fix some issues with slash commands & add missing docs (#46)
mctaylors: "but I use Rider too..."
2023-07-09 20:15:39 +05:00
abbb58f801
Switch to Remora.Discord (#41)
result checks go brrr

this also involves switching to using Discord's modern stuff like embeds
and interactions

and using brand-new for me programming concepts (dependency injection,
results)

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: mctaylors <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: mctaylors <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: nrdk <neroduck@vk.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-09 16:32:14 +03:00
2ab7a07784
Update README.md (#39) 2023-05-17 13:41:23 +03:00
8d740e1c52
Update CODEOWNERS
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-05-17 13:16:42 +05:00
c83a458633
Rearrange commands in !help (#37) 2023-05-16 10:58:35 +05:00
e80ced2d54
Update mctaylors' Language (#36)
coolest pull request fr
2023-05-15 15:30:58 +00:00
02949656bf
Change audit output if a message was deleted because of '!clear' (#34) 2023-05-12 19:56:14 +05:00
b0fd49fea2
Remove pointless PropertyGroups
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-04-27 22:55:18 +05:00
926dc0f1b7
Make sure the audit log enumerable is not empty when determining message deleter
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-04-27 22:53:28 +05:00
e35db12ab3
Merge remote-tracking branch 'origin/master' 2023-04-27 22:51:15 +05:00
cdfa0e11f7
Use DateTimeOffset#UtcNow instead of DateTimeOffset#Now (UtcNow is actually faster lol)
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-04-27 22:14:30 +05:00
dependabot[bot]
6dbfc1bfae
Bump muno92/resharper_inspectcode from 1.6.11 to 1.6.13 (#30)
Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 06:09:22 +00:00
dependabot[bot]
f01ce4fe1c
Bump muno92/resharper_inspectcode from 1.6.6 to 1.6.11 (#27)
Bumps
[muno92/resharper_inspectcode](https://github.com/muno92/resharper_inspectcode)
from 1.6.6 to 1.6.11.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 11:19:01 +05:00
41958deb0a
Fixed a memory leak caused by hitting rate limits, caused by attempts to add unset starter roles
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-03-28 22:47:01 +05:00
05ce680373
Bump Discord.Net from 3.9.0 to 3.10.0
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-03-28 15:28:34 +05:00
cac0bdc801
Fix calling commands with @mentions
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-03-20 12:33:54 +05:00
a2e0707ade
we do a little trolling (#26) 2023-03-20 11:19:17 +05:00
4cc00e01da
Bugfixes:
- Do not call RemoveUnbanAsync in guild tick loop if the user is not banned
- Fix !clear message logs being reversed
- Do not process MessageReceivedEvents by webhooks

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-14 23:17:20 +05:00
f6f5543972
Use modern Tuple syntax
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-14 22:32:29 +05:00
30a4a94f1b
Edit reminder message & add "!pardon" alias for "!unban" (#25) 2023-02-14 19:44:29 +05:00
f2e337153f
Fix bulk message deleting logs being public
bruh

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 23:11:17 +05:00
3105229ad4
Include bots for storage in MemberData, download users when populating MemberData
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 23:05:28 +05:00
7f0fd6ffb5
Fix removed roles store being overwritten
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 23:04:29 +05:00
620c706c97
Log originals of messages deleted through !clear
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 23:01:19 +05:00
a97341f9a9
Do not allow setting reminders without specifying a valid TimeSpan
Fixes #19

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 21:37:12 +05:00
8f9c71edf1
Do not delete messages from role-muted members
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 19:51:55 +05:00
8518db5b2f
Switch songs as part of guild tick loop
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 10:04:37 +05:00
233d471600
Add reminder creation feedback (#24) 2023-02-02 09:48:18 +05:00
eaeacc1206
Fix a critical performance issue in GuildData, skip guild ticks if running behind
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-02-02 00:16:31 +05:00
1c13f0a310
Resync roles before removing them during a mute
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-27 09:53:04 +05:00
8ca4b83b9c
Do not grant starter role if member is muted
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-27 09:52:13 +05:00
00f5fa0d8d
Fix removing everyone role while muting (#23)
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-27 09:46:03 +05:00
482d7ea91f
Reply to "++++" with "#" (#22) 2023-01-26 15:03:28 +00:00
b1e43611de
Resync roles when restarting bot
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-24 12:36:53 +05:00
9d5bafbbf5
Make sure every member has the starter role when ticking guilds
Closes #20

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-23 21:06:04 +05:00
c1e3abce57
Do not cache public & private feedback channels for no reason
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-23 20:29:44 +05:00
0bdf2cd33e
Reduce indenting, fix critical bug with private feedback being public and vice versa
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-18 22:10:31 +05:00
6f5a969704
One last touch...
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-18 21:01:22 +05:00
22fdb53029
Update repository link in README (#18)
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-18 15:44:53 +00:00
0c89df4791
Fix CI failures
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-01-18 20:35:22 +05:00
c220a0f379
Rename solution & project, move the project files one layer up 2023-01-18 20:17:33 +05:00
b486d2d3d9
Fix GitHub workflow status badge (#16) 2023-01-18 19:46:03 +05:00
7b8888dae3
Refactor guild data storage (#13)
Co-authored-by: mctaylors <volkovvladislav8@gmail.com>
2023-01-18 19:39:24 +05:00
f0a6c8faff
Minor issue fixes 2022-12-21 11:52:09 +05:00
f175544211
Change the logo in README depending on the website theme (#12) 2022-12-11 09:18:46 +00:00