1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 17:19:00 +03:00
Commit graph

36 commits

Author SHA1 Message Date
88448cdb49
Better implementation of /warn
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-24 15:55:26 +03:00
962580d32f
Merge remote-tracking branch 'origin/master' into warn
# Conflicts:
#	locale/Messages.resx
#	locale/Messages.ru.resx
#	locale/Messages.tt-ru.resx
#	src/Messages.Designer.cs
2024-03-24 13:19:18 +03:00
ac8621a2ec
Pre-Wiki Update (#285)
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>
2024-03-23 21:45:39 +03:00
ca49231c86
Disable issue report button if dirty version detected (#275)
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>
2024-03-20 15:59:25 +03:00
ecb92a318c
Fix /ping not showing correct locale (#276)
yeah...

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-20 11:22:54 +00:00
cd75780582
Add "Member left" message (#234)
Closes #231

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
2024-03-20 11:18:40 +00:00
2342116e87
Add GitInfo NuGet package (#268)
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>
2024-03-19 20:51:32 +03:00
ab2158a648
Initial implementation of /warn
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-19 18:46:56 +03:00
771750c922
Rename locale Sound to Loaded for clarity (#270)
If you go through the locales, sooner or later you will notice `Sound*`,
which is used in `GuildLoadedResponder.cs`. A new contributor (most
likely) will not understand what it is used for at once, because we use
`$"Loaded{i}".Localized()` instead of `Messages.Sound*` directly. Also,
if you change the locale's value, for example the same "Loaded!",
`Sound` will not fit anymore, because "Loaded!" is not a sound, but a
phrase.

Other suggestions are welcome.

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-18 21:27:35 +03:00
5105b43eff
Add WelcomeMessagesChannel setting (#269)
Closes #232

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-18 11:42:37 +03:00
62709d927b
Add time format example to the description of commands that use TimeSpan. (#267)
This PR was made to help users who are trying /remind for the first time
by showing an example of the correct time format in the description.

---------

Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-03-17 16:46:53 +03:00
8eed295fcd
Add /8ball command (#264)
@neroduckale was bored so I made this feature.

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2024-03-13 20:40:29 +03:00
af84f8853a
Add /editremind (#247)
In this PR, I'm adding a command to modify existing reminders. This can
be useful if you, for example, got the name a bit wrong or set the wrong
reminder time. Just use /editremind and recreating the reminder from
scratch will no longer be necessary.

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-01-27 15:50:27 +03:00
e01fde83c6
Use custom TimeSpanParser (#223)
Closes #154

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2023-12-31 12:27:00 +00:00
285763d50d
/userinfo: Show if the user was kicked (#242)
Closes #241 

Updates:
- Show if the user was kicked by [adding "Kicked" parameter to
MemberData](https://github.com/LabsDevelopment/Octobot/issues/241)
- Change `mctaylors-ru`'s `UserInfoBannedPermanently` string to be
different from `UserInfoBanned`
- Finally add `AppendPunishmentsInformation` method to avoid Cognitive
Complexity
- Use MemberData to check if the user was banned
- Rename variable `isMuted` to `wasMuted` to be consistent with other
variable names

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2023-12-21 20:35:10 +05:00
4dc460a269
Add issue button w/ some button updates (#221)
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>
2023-12-17 21:35:09 +03:00
42ab11d253
Rename "Event details" button to "Open Event Info" (#209)
The correct phrasing used by Discord is "Event Info"

![image](https://github.com/LabsDevelopment/Octobot/assets/95250141/8165b70d-4c81-4b85-8251-db2de6a7f4ca)

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2023-12-08 16:06:50 +05:00
cf7007f269
Handle guild data load errors better (#172)
Previously, any errors in guild data load will cause the bot to be
unusable in that guild. It didn't help that the end users had no
information that something was wrong! Now, any errors will be logged
better (with the full path to the file that couldn't be loaded), and the
users will receive a message saying that functionality is degraded

The old way to save objects was to serialize them directly into streams
opened by `File#Create`. This can cause problems if the serialization
isn't completed, because `File#Create` overwrites the file with an empty
one on the spot. Now, objects are first deserialized into a temporary
file, then the original is replaced by the temporary, then the temporary
is deleted.

Errors during guild data load would sometimes cause the bot to replace
the corrupted file with a default one whenever a save is triggered. Now,
guilds with load errors won't have their data saved to aid in debugging

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: mctaylors <mctaylxrs@outlook.com>
2023-10-26 18:14:27 +03:00
fb3aebb1e0
Notify user when a command execution error occurs (#171)
With this PR, whenever command execution fails, the user will get an
error message with details of the error that can be passed on to
developers

An unrelated minor change: errors caused by task cancellations will no
longer be logged

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: mctaylors <mctaylxrs@outlook.com>
2023-10-26 14:54:15 +00:00
5b84c8d8d0
Add more info output to /delremind (#173)
_There are times when you want to be sure of what you've destroyed._

Therefore, in this PR I added the output of the text of the deleted
reminder along with its position in the list, because you can make a
mistake with deleting a reminder and forget about what you needed to be
reminded about.

---------

Signed-off-by: mctaylors <mctaylxrs@outlook.com>
2023-10-26 17:41:47 +03:00
b30d690113
Add filtering by message author to /clear (#169)
Closes #164 

This PR adds an optional argument to `/clear` - `author` of type User.

If the user is specified, only messages sent by that user will be
cleared. Simple as that.
2023-10-17 12:20:58 +00:00
d1e3558bc6
/remind: Switch away from zero-based numbering and rename index (#155)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-10-06 14:17:48 +00:00
4748c5de2c
Rename /showinfo to avoid confusion with /guildinfo (#153)
Depends on #152

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-10-06 15:35:08 +03:00
72f728323e
Add /guildinfo (#152)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-10-06 15:23:45 +03:00
777dbc6eec
Update /random (#138)
Updates in /random:
- Set default minimum number to 0.
- Show maximum & minimum numbers.
- Recolor & display a message when user tries to use exact same number in first and second fields for some reason.
- Mention user in small title.
- Automatically detect max & min numbers.
- Add `long` support.
- Show what default number is.

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Signed-off-by: Apceniy <53149450+Apceniy@users.noreply.github.com>
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Co-authored-by: Apceniy <53149450+Apceniy@users.noreply.github.com>
2023-10-04 15:32:54 +03:00
bae92fc84b
Remove unused messages (#144) 2023-10-03 13:27:27 +00:00
413b8a4781
Add /timestamp (#140)
Original idea from @Octol1ttle

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-10-03 15:07:41 +03:00
804bcd6e68
Rebrand to Octobot (#128)
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>
2023-09-30 18:58:32 +05:00
2e2f50908e
Add /random (#127)
It could have been a milestone PR, but of course I made a mistake
_somewhere_.

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-29 16:22:44 +00:00
04897cab20
Redesign embeds (#123)
TODO before merging:

- [x] /about
- [x] /ban
- [x] /unban
- [x] /kick
- [x] /mute
- [x] /unmute
- [x] /remind
- [x] /listremind
- [x] MessageEditedResponder
- [x] MessageDeletedResponder

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-29 18:36:16 +03:00
0f916d46de
Add /showinfo (#122)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-29 15:31:45 +03:00
3a3865ba3d
Add /resetsettings (#111)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-22 20:23:08 +03:00
da2a88246c
Add failed embed for /listremind (#88)
Without this embed, if there are no reminders created by the user, the
bot will endlessly think because StringBuilder will be empty and normal
embed will not be shown.
2023-08-14 07:45:56 +00:00
488a1eec0c
Add /listremind and /delremind (#82)
This PR closes #61.

This PR adds the `/listremind` command and the `/delremind` command. The
`/delremind` command requires an index to determine which reminder to
delete.

cc @mctaylors review embed design and feature experience

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-12 13:54:51 +00:00
05fd343dce
Improved /settingslist + fixed /settings pt.1 (#65)
This PR is mainly aimed at improving /settingslist and fixing /settings

List of things to do before merging:
- [x] #62
- [x] Add the pages feature to /settingslist
- [x] Add bullets like these ->
![](https://github.com/TeamOctolings/Boyfriend/assets/95250141/fdf1a3b8-bb64-473d-9f57-bc6e34812811)

And since the development has already been taking more than 2 days, I
suggest splitting the PR into 2 parts.

List of other things that will be in the future PR:
- mctaylors#1
- Fix bot not answering when an invalid setting is specified in
/settings
- Options list for /settings

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-07-25 19:53:11 +05: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
Renamed from locale/Messages.Designer.cs (Browse further)