1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-02 20:13:13 +00:00
Commit graph

90 commits

Author SHA1 Message Date
Kwoth
d67f0b1850 Ignore credentials.json.bak 2021-09-06 21:34:54 +02:00
Kwoth
3861b407dc Fixed GetText extension not adding string format params 2021-09-06 21:34:54 +02:00
Kwoth
43f4465a29 Fixed a typo and created a draft linux migration guide 2021-09-06 21:34:54 +02:00
Kwoth
0e248f0bf8 Removed a todo (gif now shows how to enable priviledged intent) and slight update to linux guide 2021-09-06 21:34:53 +02:00
Kwoth
dc3517fe4b Updated .gitignore (added creds.yml) 2021-09-06 21:34:53 +02:00
Kwoth
cfc8a51ce5 Removed creds.yml from src/NadekoBot and updated README.md slightly 2021-09-06 21:34:53 +02:00
Kwoth
79f785cd14 Updated CHANGELOG.md 2021-09-06 21:34:53 +02:00
Kwoth
a7e2e1890c - Almopst completed windows from source guide
- Added output and src/NadekoBot/output folders to gitignore
2021-09-06 21:34:53 +02:00
Kwoth
0921d154cc Some work on docker support. Source generator is failing with a weird error. Updated readme and changelog 2021-09-06 21:34:53 +02:00
Kwoth
0107f7bad3 Removed cmd-versions.json (?) and added some explanatory README.md's for individual projects 2021-09-06 21:34:53 +02:00
Kwoth
ddee6bc7c7 Removed nmearly all unused strings from responses.en-US.json. Left a few which might get used in the near future 2021-09-06 21:34:53 +02:00
Kwoth
991da3ed73 Removed around a half of unused response strings 2021-09-06 21:34:53 +02:00
Kwoth
565c1132fa Changed last few usages of old string based gettext. All strings now use new system. Needs testing 2021-09-06 21:34:53 +02:00
Kwoth
919bedeae6 Changed (almost) all responses to make them use the new system instead of raw strings
- Fixed many invalid string keys
2021-09-06 21:34:53 +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
34d0f66466 - Added NadekoBot.Generators projects which will contain source generators
- Implemented initial version of the response strings source generator
  - Creates a class with property names equivalent to key names in responses.en-US.json
  - Each Property has struct type (with generic type parameters matching the number of string format placeholders) for type safe GetText implementation
  - Struct types are readonly refs as they should be ephermal, and only used to pass string keys to GetText
2021-09-06 21:34:52 +02:00
Kwoth
e67f659a8a Added a fix from 1.9 branch for repeaters 2021-09-06 21:34:52 +02:00
Kwoth
b84f40def6 - Initial work on Dockerfile
- Updated README.md with more information
- Added some todos
2021-09-06 21:34:52 +02:00
Kwoth
971b5078b7 Updated readme 2021-09-06 21:34:52 +02:00
Kwoth
711b2e1dde updated README.md 2021-09-06 21:34:52 +02:00
Kwoth
ff82c01291 Updated changelog 2021-09-06 21:34:52 +02:00
Kwoth
5d9320941a Added fixes from 1.9 branch:
- Custom reaction permission error fix
- Local tracks .lq fix after they're loaded from playlist
- Fixed some response strings
2021-09-06 21:34:52 +02:00
Kwoth
42d623b696 Replaced access to .Context with .ctx 2021-09-06 21:34:52 +02:00
Kwoth
3c33c55dda .warnp should accept roles only below your max role. Also added a custom error message 2021-09-06 21:34:52 +02:00
Kwoth
71da4d11c0 - Removed static color fields
- Removed unused code
- BanTemplate will get error color from bot config
2021-09-06 21:34:52 +02:00
Kwoth
0e81f2abf4 Upped version to beta2 2021-09-06 21:34:52 +02:00
Kwoth
8fb7239100 - Updated creds_example.yml
- Added credentials.json -> creds.yml migration
- Migrated credentials.json fields are:
  - Token
  - OwnerIds
  - GoogleApiKey
  - OsuApiKey
  - CleverbotApiKey
  - TotalShards (although you should set this from Coordinator's coord.yml TotalShards, so this setting will usually have no effect)
  - PatreonAccessToken and PatreonCampaignId
  - VotesUrl and VotesToken
  - BotListToken
  - RedisOptions
  - LocationIqApiKey and TimezoneDbApiKey
  - CoinmarketcapApiKey
2021-09-06 21:34:51 +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
9f6cbe0929 ban templates will now use smarttext instead of crembed 2021-09-06 21:34:51 +02:00
Kwoth
dc6d17eee7 Repeater and Greet services are now using smarttext instead of crembed 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
b59c4064b1 ... (quoteprint) is now using smarttext 2021-09-06 21:34:51 +02:00
Kwoth
373e9e920d - .say replacement fix
- .send and .qid now use smarttext instead of crembed
- added + operator for adding string to smarttext
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
236c286278 Added SmartText and inheritors SmartPlainText and SmartEmbedText which will replace CREmbed in the future 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
5b4daa9dd3 All .AddField calls no longer use builder
- Cleaned up convertlist and listserver embeds slightly
2021-09-06 21:34:50 +02:00
Kwoth
a17d0afc7d all calls to .WithAuthor and .WithFooter no longer use their respective builders 2021-09-06 21:34:50 +02:00
Kwoth
cbecd823c1 Cleaned up embedbuilder calls to use parameters instead of footer builder 2021-09-06 21:34:50 +02:00
Kwoth
ac9f84715b - Recreated cleanup migration with discorduser default values
- Using LinqToDb UpdateOrInsert for .EnsureUserCreated
2021-09-06 21:34:50 +02:00
Kwoth
0fc5f540d8 - Added Cloneable deep clone source generator nuget package
- Configs are no cloned using generated clone, not by serializing/deserializing
- Arrays/Lists (collections in geneeral) are still not cloned properly
- Removed GetRawData from config as it is no longer needed, new clone is very fast
- Added ICloneable<T> which all configs implement
- Cleaned up config classes/code
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
fd35d3a836 - Cleaned up completed todos
- Config Data won't be copied every time it's accessed now, but YamlDotNet doesnt' support records, so data is dangerously mutable, needs solution
2021-09-06 21:34:50 +02:00
Kwoth
4c0c3c9228 Refactored typereaders to use DI instead of getting services manually 2021-09-06 21:34:50 +02:00
Kwoth
3cc34bfdc3 Changed all .GetService to .GetRequiredService because no service should be ever missing. However most of these should be removed in one of the future patches. 2021-09-06 21:34:50 +02:00
Kwoth
aeb6f8662c Early behavior fixups:
- Priorities are now higher number -> higher priority
- Priorities are now actually respected
- Early behaviors now print custom messages when they perform an action (Filter trigger, blacklist, poll vote, etc)
- small cleanup
2021-09-06 21:34:50 +02:00
Kwoth
e681978f83 - xp template reload now uses new pubsub
- multiplexer.GetSubscriber().subscribe is no longer used in any service
- fixed some build warnings
2021-09-06 21:34:50 +02:00