Commit Graph

42 Commits

Author SHA1 Message Date
Kwoth
d80cbb4647 Refactors. Cleanup. Refactored responses source gen a little. Parametrized localized strings are now generic. Refactored .cash bank interaction. Updated changelog. Reverted clubapps/ban/unban to use .ToString method and configured it to not have right to left unicode. Added extension methods to SocketMessageComponent akin to ones on the IMessageChannel (RespondConfirm, etc...) 2022-05-05 22:59:07 +02:00
Kwoth
f132aa2624 - Added a simple bank system. Users can deposit, withdraw and check the balance of their currency in the bank.
- Users can't check other user's bank balances.
- Added a button on a .$ command which, when clicked, sends you a message with your bank balance that only you can see.
- Updated pagination, it now uses buttons instead of reactions
- using .h <command group> (atm only .bank is a proper group) will list commands with their descriptions in that group
2022-04-29 07:22:49 +02:00
Kwoth
35ddd150ba Pagination is now using buttons instead of reactions 2022-04-28 06:10:06 +02:00
Kwoth
5d2d74b92a Full support for embed arrays in .greet/.bye, .say and other commands which use embeds
- Website to create them is live at eb2.nadeko.bot (it will soon be replacing eb.nadeko.bot)
- Embed arrays don't have a plainText property (it's renamed to 'content')
- Embed arrays use color hex values instead of an integer
- Old embed format will still work
- There shouldn't be any breaking changes
2022-04-26 02:33:19 +02:00
Kwoth
18400dc53a Fixed a nullref message when the bot is loading medusae. Added support for multiple embeds in features which support custom embeds in the form of
{plainText:text-here, embeds: [embedObject, embedObject, embedObject]}
2022-04-17 09:58:30 +02:00
Kwoth
7cb15f5278 Medusa System Added
Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
2022-04-16 12:44:46 +00:00
Kwoth
e23233ee06 WIP db provider support for Mysql and Postgres 2022-04-11 10:41:26 +00:00
Kwoth
ffa2c3f119 Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules 2022-02-02 01:44:45 +01:00
Kwoth
3910dc7499 - Improved .curtrs (It will now have a lot more useful data in the database, show Tx ids, and be partially localized)
- Added .curtr command which lets you see full information about one of your own transactions with the specified id
- Added .WithAuthor(IUser) extension for embedbuilder
2022-01-25 05:55:38 +01:00
Kwoth
2ce3262d59 Fixed around 140 wrong namings and other refactorings which were marked as warnings 2022-01-08 11:51:41 +01:00
Kwoth
f13d7d2c80 Cleaned up some unused/commented code
- Small amount of refactoring
- Separated imagesharp extension to ImageSharpExtensions.cs
- Using .join Ienumerable extension instead of string.join in some places
2022-01-04 09:06:42 +01:00
Kwoth
4e60ea4241 Fixed an extra whitespace in usage part of command help if the command has no arguments 2022-01-02 17:00:33 +01:00
Kwoth
2edda76218 - Generator will now also add [NadekoDescription] attribute to commands
- CustomReactions module (and customreactions db table) renamed to Expressions. This was done to remove confusion about how it relates to discord Reactions (it doesn't, it was created and named before discord reactions existed)
- Permissionv2 db table renamed to Permissions
- Expression command now start with ex/expr and end with the name of the action or setting. For example .exd is expression delete
- CommandStrings will now use methodname as the key, and not the command name (first entry in aliases.yml). In other words aliases.yml and commands.en-US.yml will use the same keys (once again).
2022-01-02 12:01:33 +01:00
Kwoth
9b4eb21321 Using pattern matching for nulls where applicable, discarded unused lambda parameters, cleaned up some classes. Unignored ServerLog commands which was mistakenly ignored due to a .gitignore rule 2022-01-01 08:44:51 +01:00
Kwoth
82000c97a4 Applied codestyle to all .cs files 2021-12-29 06:07:16 +01:00
Kwoth
723447c7d4 - Updated editorconfig rules to hopefully look a bit nicer.
- Removed configureawait(false) from everywhere as it doesnt' do anything in a console app and just makes the code look ugly
- Started using .WhenAll extension instead of Task.WhenAll to make it look nicer when chaining methods
2021-12-28 21:14:40 +01:00
Kwoth
59f5056035 NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common 2021-12-28 10:44:00 +01:00
Kwoth
d5fd6aae8e - More code cleanup and codestyle updates
- Fixed some possible nullref exceptions
- Methods signatures now have up to 3 parameters before breakaing down each parameter in a separate line
- Method invocations have the same rule, except the first parameter will be in the same line as the invocation to prevent some ugliness when passing lambas as arguments
- Applied many more codestyles
- Extensions folder fully reformatted
2021-12-26 17:28:39 +01:00
Kwoth
d18f9429c6 Kotz's editorconfig styles slightly modified. Target typed new usage. Brackets in expressions used for clarity. 2021-12-26 02:52:09 +01:00
Kwoth
93b8bca018 Switch to discord.net 3.0.0 2021-12-23 08:02:23 +07:00
Kwoth
c66e491ce9 Implicit usings and more global usings 2021-12-21 02:36:47 +01:00
Kwoth
1b2017024c More target-typed new and redundant paranthesis cleanup 2021-12-20 00:33:11 +01:00
Kwoth
cd379fd308 vars and target-typed new 2021-12-20 00:15:39 +01:00
Kwoth
ee33313519 Global usings and file scoped namespaces 2021-12-19 05:14:11 +01:00
Kwoth
83daf3c30f Made .showembed always output lowercase field names and no null values 2021-12-14 19:41:07 +01:00
Kwoth
c80898a7bf Fixed an error that would show up in the console when a club image couldn't be drawn in certain circumstances 2021-11-04 17:01:18 +01:00
Kwoth
3861b407dc Fixed GetText extension not adding string format params 2021-09-06 21:34:54 +02:00
Kwoth
4484732f5d - Fixed counting parameters which have formats in response strings
- Almost finished porting localized string keys as methods
- Compiles
2021-09-06 21:34:53 +02:00
Kwoth
0115d35247 WIP: rework of localized strings, instead of generic LocStr, LocStr is now a struct which contains both the key, and the values which should be put into the value's placeholders. strs' properties are now methods which take values as arguments, and properties if they don't 2021-09-06 21:34:53 +02:00
Kwoth
9d375dccee wip strings rework, experimenting, nothing works 2021-09-06 21:34:52 +02:00
Kwoth
70288f7670 Second iteration of source generated localized strings
- Strs renamed to strs
- Generic params will now default to object instead of string for convenient argument passing
- Many strings changed to use generated properties
2021-09-06 21:34:52 +02:00
Kwoth
0b71e9c28f - Removed some duplicated code from custom reactions
- CREmbed completely removed and replaced by SmartText
2021-09-06 21:34:51 +02:00
Kwoth
468bc5324d - Fixed calls to SendAsync - they don't require EmbedBuilderService
- DmHelpText now uses smarttext and supports user-related placeholders
2021-09-06 21:34:51 +02:00
Kwoth
0064df8ae4 - .say now uses new SmartText instead of CREmbed
- Added IMessageChannel extensions for sending smarttext
- Added implicit operator from string to smarttext (which just creates smartplaintext instance)
2021-09-06 21:34:51 +02:00
Kwoth
5e4754fa40 - Reworked embed builder
- Use IEmbedBuilderService to create embed builders
- Wrapped embed builder and using IEmbedBuilder
2021-09-06 21:34:51 +02:00
Kwoth
cbecd823c1 Cleaned up embedbuilder calls to use parameters instead of footer builder 2021-09-06 21:34:50 +02:00
Kwoth
a8a4c9fb44 - NoPublicBotAttribute will now be properly ignored when built with GlobalNadeko configuration
- Added ILogCommandsService which will have dummy implementation on public bot, this means Logging Commands will be present on public bot to pull up help etc
- When .ve is enabled, NoPublicBot commands will show a nicer error message with link to selfhosting guide (thx ene)
- Fixed xp gain and .xp command not working on new users
- General cleanup
2021-09-06 21:34:50 +02:00
Kwoth
9f34f8f00f Don't load executor behaviors as a dep, but initialize after all services are loaded. Experimenting on services 2021-09-06 21:34:49 +02:00
Kwoth
49f9b96755 One of the last major cleanups. All NadekoBot.Core.* namespaces renamed to NadekoBot.* 2021-09-06 21:34:48 +02:00
Kwoth
c86bf6f300 - NadekoBot class renamed to Bot
- Implemented grpc based coordinator. Supports restarting, killing single or all shards, as well as getting current shard statuses. (Adaptation of the one used by the public bot)
- Coord is setup via coord.yml file
- Methods from SelfService which deal with shard/bot restart etc have been moved to ICoordinator (with GrpcRemoteCoordinator being the default implementation atm)
- Vastly simplified NadekoBot/Program.cs
2021-09-06 21:34:46 +02:00
Kwoth
d8c7cdc7f4 Changed all == null to is null and all !(* == null) to * is not null 2021-09-06 21:34:44 +02:00
Kwoth
91ecf9ca41 Restructured folders and project names, ci should be fixed 2021-09-06 21:29:51 +02:00