Compare commits

...

92 Commits
4.3.4 ... 4.3.9

Author SHA1 Message Date
Kwoth
793a49fc64 Updated version to 4.3.9 2022-10-12 20:20:05 +02:00
Kwoth
8b6be656b3 Updated CHANGELOG.md 2022-10-12 20:19:33 +02:00
Kwoth
89a88304dc If version is not specified, Nadeko.Medusa will default to 5.0.0 to allow for full compatibility for from-source-selfhosters 2022-10-12 20:10:55 +02:00
Kwoth
a7fe9ae08f .betstats now looks uwu 2022-10-11 19:59:58 +02:00
Kwoth
0469705037 Clarified .feedadd errors 2022-10-11 19:14:16 +02:00
Kwoth
dc568fe0e2 Removed a duplicate string key 2022-10-11 18:29:53 +02:00
Kwoth
eb01bb6c08 Removed ambiguity in clubban and clubunban error messages 2022-10-11 18:21:45 +02:00
Kwoth
71a3539d0e Possible fix for Remind .timely button 2022-10-10 18:39:49 +02:00
Kwoth
c896a0cdb8 Added better error messages to .clubapply 2022-10-09 16:25:28 +02:00
Kwoth
8effe817ad Fixed a bug with postgresql and mysql migration folders as well as compilation warning related to it 2022-10-08 09:05:31 +02:00
Kwoth
eedf6998b6 Fixed a bug in cmdcd not modifying the database. Added total stats to .betstats 2022-10-07 11:01:26 +02:00
Kwoth
e6b7c31a72 Gambling Tracker will only track successful removes 2022-10-06 10:55:12 +02:00
Kwoth
2f77fd57b0 Improved .betstats formatting 2022-10-04 16:27:19 +02:00
Kwoth
fda3d92134 Added gambling stats migrations for postgres and mysql 2022-10-03 19:58:08 +02:00
Kwoth
fe6f28143b Updated changelog 2022-10-03 13:52:17 +02:00
Kwoth
df3909fc55 Added .betstats command, shows statistics for multiple gambling commands, .slotstats removed as it is obsolete 2022-10-03 13:49:52 +02:00
Kwoth
9ffa701742 Updated changelog.md 2022-10-02 15:45:28 +02:00
Kwoth
a4f7df8aee Merge branch 'cmdcd-and-cleanup' into 'v4'
Cmdcd and cleanup

See merge request Kwoth/nadekobot!269
2022-10-02 13:38:51 +00:00
Kwoth
15e6cff14a * Rewrote cmdcd service, prettified and paginated .cmdcds
* Cleaned up/improved some command handler code
* Fixed .yun when channel id has an underscore
2022-10-02 13:38:50 +00:00
Kwoth
e63ac07a52 Fixed typo 2022-10-01 08:54:11 +02:00
Kwoth
a294e3bf8f Fixed -c GlobalNadeko compilation 2022-10-01 08:52:29 +02:00
Kwoth
a5b2fac69c .curtrs may? run a little faster. Uses async, clarified GamblingConfig transactionLifetime field 2022-09-28 07:09:37 +02:00
Kwoth
a8e06a5ae4 Clarified .remind permission requirement 2022-09-26 14:20:26 +02:00
Kwoth
761bdd8610 Merge branch 'hokutochen-v4-patch-16984' into 'v4'
Added VPS hosting requirements

See merge request Kwoth/nadekobot!268
2022-09-24 09:50:20 +00:00
Hokuto Chen
b5904889b0 Added VPS hosting requirements 2022-09-24 09:50:20 +00:00
Kwoth
5b4517cf5c Updated changelog, removed the ability to bet 0 on betdraw 2022-09-23 23:01:11 +02:00
Kwoth
72158c0a2c Added -a / --after <messageid> option to .prune, converted the argument to proper options object 2022-09-17 13:51:03 +02:00
Kwoth
1ca6f6dc5c Added .autopublish command 2022-09-16 21:49:50 +02:00
Kwoth
005fd7b8c6 Possible fix for missing IGuildUser when using guild commands, closes #383 2022-09-15 17:02:53 +02:00
Kwoth
3fc53b0609 Upped version to 4.3.7, updated changelog 2022-09-14 02:46:03 +02:00
Kwoth
62ec2241e4 Added pagination to .reroli 2022-09-14 02:44:31 +02:00
Kwoth
75f8254a8e Removed currencies from units.json as they're pulled from api 2022-09-13 21:50:48 +02:00
Kwoth
f23ffe0c67 Added .shopreq - Shop items can now have a role requirement in order to purchase. Added .shopbuy alias for .buy 2022-09-13 21:33:20 +02:00
Kwoth
d1a818542c Split stream deleter service into a separate file, there will no longer be a viewer count when the stream comes online, as it will (almost?) always show 0 2022-09-12 01:22:58 +02:00
Kwoth
15f67e3a51 more typos 2022-09-11 22:49:46 +02:00
Kwoth
412f346ac8 Fixed some typos in commands.en-US.yml 2022-09-10 22:53:03 +02:00
Kwoth
8107a80c4c Added .exds to complement .exas 2022-09-09 21:02:16 +02:00
Kwoth
f1c7d7437a Upped version to 4.3.6, Updated CHANGELOG.md 2022-09-08 20:41:06 +02:00
Kwoth
9a013db25f Removed some unused usings 2022-09-04 12:19:15 +02:00
Kwoth
6f75161c80 Added .expraddserver (.exas) which will server as a server-only alternative to '.exa' in case users want to override default Admin permissions with .dpo 2022-09-03 17:21:38 +02:00
Kwoth
3f56e5b651 Merge branch 'v4' of https://gitlab.com/kwoth/nadekobot into v4 2022-09-03 10:28:46 +02:00
Kwoth
4875abbe86 Fake joined at for karney on nadeko server 2022-09-03 10:28:38 +02:00
Kwoth
83863f3a6c Update responses.uk-UA.json (POEditor.com) 2022-09-02 12:27:52 +00:00
Kwoth
f07abad1ec Update responses.es-ES.json (POEditor.com) 2022-09-02 12:27:51 +00:00
Kwoth
b6909a4120 Update responses.ru-RU.json (POEditor.com) 2022-09-02 12:27:49 +00:00
Kwoth
aaf7f04216 Update responses.pt-BR.json (POEditor.com) 2022-09-02 12:27:48 +00:00
Kwoth
628871b0da Update responses.pl-PL.json (POEditor.com) 2022-09-02 12:27:47 +00:00
Kwoth
a50ad09c8d Update responses.it-IT.json (POEditor.com) 2022-09-02 12:27:46 +00:00
Kwoth
1358ff50a4 Update responses.id-ID.json (POEditor.com) 2022-09-02 12:27:44 +00:00
Kwoth
ee9fede3b1 Update responses.de-DE.json (POEditor.com) 2022-09-02 12:27:43 +00:00
Kwoth
1d7e9e8471 Update responses.fr-FR.json (POEditor.com) 2022-09-02 12:27:42 +00:00
Kwoth
d2fe7f8d11 Update responses.nl-NL.json (POEditor.com) 2022-09-02 12:27:40 +00:00
Kwoth
75958efe17 Update responses.zh-TW.json (POEditor.com) 2022-09-02 12:27:39 +00:00
Kwoth
7746d2aca1 Update responses.zh-CN.json (POEditor.com) 2022-09-02 12:27:38 +00:00
Kwoth
e631df3326 Update responses.ar.json (POEditor.com) 2022-09-02 12:27:36 +00:00
Kwoth
ba44fdb55f Reminders can now be embeds. But you won't be able to set plaintext 2022-08-31 20:37:58 +02:00
Kwoth
59a1e56dad Added .banprune command which sets how many days worth of messages will be pruned when bot (soft)bans a person either through a command or another punishment feature. Also updated .next usage string. 2022-08-31 17:47:19 +02:00
Kwoth
cd6fe46c2b More user friendly error when parsing of a number fails. 2022-08-31 13:40:41 +02:00
Kwoth
fb4f470b44 Added .qdelauth - Delete all quotes by the specified author on this server. If you target yourself - no permission required 2022-08-30 15:46:10 +02:00
Kwoth
b69e25edf4 Added .timeout command 2022-08-28 16:16:24 +02:00
Kwoth
9eae27bc15 Added an option to award currency based on received xp 2022-08-26 13:41:30 +02:00
Kwoth
bed36f8784 Fixed compilation warning (no functional change) 2022-08-24 17:31:21 +02:00
Kwoth
623f5ccd5e Merge branch 'v4' of https://gitlab.com/kwoth/nadekobot into v4 2022-08-24 09:20:40 +02:00
Kwoth
6da8201c2d Awarded xp is now correctly used in level up calculations, closes #376 2022-08-24 09:18:22 +02:00
Kwoth
d1c24d4721 Merge branch 'hokutochen-v4-patch-63590' into 'v4'
corrected swapped instructions

See merge request Kwoth/nadekobot!266
2022-08-23 01:11:50 +00:00
Hokuto Chen
7e5055268a corrected swapped instructions 2022-08-23 01:11:50 +00:00
Kwoth
e84e33b94f Merge branch 'hokutochen-v4-patch-01854' into 'v4'
Update creds-guide.md

See merge request Kwoth/nadekobot!265
2022-08-21 19:19:40 +00:00
Hokuto Chen
f21c96bdf4 Update creds-guide.md 2022-08-21 10:37:29 +00:00
Kwoth
430daf9b19 Merge branch 'hokutochen-v4-patch-16720' into 'v4'
added auto restart option in docs

See merge request Kwoth/nadekobot!264
2022-08-17 20:16:16 +00:00
Kwoth
7c8756096d Upped version to 4.3.5 2022-08-17 22:10:07 +02:00
Kwoth
7d9e456fe5 Fixed .xpshopbuy having mixed up arguments for frames and bgs 2022-08-17 22:02:36 +02:00
Hokuto Chen
948db31384 added auto restart option in docs 2022-08-15 05:47:48 +00:00
Kwoth
df1a775fec Revert "Reverted club xp updates, and non-opt in xp system as it's causing db locking"
This reverts commit 6c169e057b.
2022-08-14 23:35:13 +02:00
Kwoth
6c169e057b Reverted club xp updates, and non-opt in xp system as it's causing db locking 2022-08-14 22:45:14 +02:00
Kwoth
b164da38e3 Added .roleinfo commands, added the ability to show colors other than ok error and pending to IEmbedBuilder 2022-08-11 17:04:51 +02:00
Kwoth
dc229ea2b3 Added Timeout as a punishment to warnpunish and anti* commands 2022-08-11 16:19:02 +02:00
Kwoth
b853495d65 Added .emojiremove command 2022-08-11 16:05:00 +02:00
Kwoth
0ff02cede9 Added .emojiremove 2022-08-11 15:56:07 +02:00
Kwoth
f7e0e635e6 Added .threadcreate and .threaddelete commadns which create and delete public threads 2022-08-11 15:42:37 +02:00
Kwoth
a065189023 Fixed .bank take, added .bank seize alias. Added .bank award 2022-08-11 15:14:08 +02:00
Kwoth
1affeb0683 Update responses.de-DE.json (POEditor.com) 2022-08-11 12:43:54 +00:00
Kwoth
6b3c9f01ca Update responses.fr-FR.json (POEditor.com) 2022-08-11 12:43:53 +00:00
Kwoth
e9eb6ff2ad Added '.bank take' owner only command 2022-08-11 14:39:44 +02:00
Kwoth
0170536d1c Guild XP is no longer opt-in. Only global xp 2022-08-11 13:54:20 +02:00
Kwoth
c65e769128 Removed Badges from README.md 2022-08-11 11:00:22 +00:00
Kwoth
998779203a Fixed users not gaining club xp 2022-08-10 12:31:52 +02:00
Kwoth
e0e4d697c3 Added pull again button to slot, fixed a double 'you don't have enough' message 2022-08-09 23:15:27 +02:00
Kwoth
e9c7293014 Running .timely command too early will now show a pending color, not an error color 2022-08-09 22:43:22 +02:00
Kwoth
cf876a4148 removed obsolete xp database columns 2022-08-08 17:36:39 +02:00
Kwoth
6b9a858f28 Added Use button on sucessful .xpshopbuy or when a user already owns the item 2022-08-08 16:17:30 +02:00
Kwoth
38e3badb87 Greatly unboilerplated and simplified nadeko interaction button construction 2022-08-07 17:00:36 +02:00
Kwoth
13d2fbd560 Fixed VoiceXP bug, closes #374. Upped version to 4.3.4, Updated changelog 2022-08-07 13:08:07 +02:00
181 changed files with 56179 additions and 1516 deletions

View File

@@ -104,7 +104,7 @@ publish-medusa-package:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG
script:
- LAST_TAG=$(git describe --tags --abbrev=0)
- if [ $CI_COMMIT_TAG ];then MEDUSA_VERSION="$CI_COMMIT_TAG"; else MEDUSA_VERSION="$LAST_TAG-$CI_COMMIT_SHA"; fi
- if [ $CI_COMMIT_TAG ];then MEDUSA_VERSION="$CI_COMMIT_TAG"; else MEDUSA_VERSION="$LAST_TAG-$CI_COMMIT_SHORT_SHA"; fi
- cd src/Nadeko.Medusa/
- dotnet pack -c Release /p:Version=$MEDUSA_VERSION -o bin/Release/packed
- dotnet nuget push bin/Release/packed/ --source https://www.myget.org/F/nadeko/api/v2/package --api-key "$MYGET_API_KEY"

View File

@@ -2,7 +2,110 @@
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
## Unreleased
## [4.3.9] - 12.10.2022
### Added
- `.betstats` shows sum of all bets, payouts and the payout rate in %. Updates once an hour
### Changed
- `.betstats` looks way better (except on Mac)
- `.feedadd` errors clarified and separated in individual error messages for each issue.
- `.clubban` and `.clubunban` errors clarified and separated in individual error messages for each issue.
- `.clubapply` better error messages
### Fixed
- `.timely` 'Remind' button fixed in DMs
- `.cmdcd` database bugs fixed
- Fixed bugged mysql and postgresql migrations
- Fixed issues with lodaing medusae due to strict versioning
### Removed
- `.slotstats` Superseded by `.betstats`
## [4.3.8] - 02.10.2022
### Added
- Added `.autopublish` command which will automatically publish messages posted in the channel.
- Added `--after <messageid>` option to prune which will make prune only delete messages after the specified message id.
### Changed
- `.prune` options `--after` and `--safe` are now proper command options, and will show in .h help
- `.cmdcd` code mostly rewritten, slight QoL improvements.
- Clarified `.remind` permission requirements in help text
- `.cmdcds` looks a little better, and is paginated
### Fixed
- Fixed trivia bugs
- Fixed `.yun` not working with channels with underscore in the name
## [4.3.7] - 14.09.2022
### Added
- Added `.exprdelserv` (.exds) to completement .exas. Deletes an expression on the current server and is susceptible to .dpo, unlike .exd
- Added `.shopreq` which lets you set role requirement for specific shop items
- Added `.shopbuy` alias to `.buy`
### Fixed
- Fixed `.convertlist` showing currencies twice (this may not apply to existing users and it may require you to manually remove all currencies from units.json)
### Removed
- Removed `Viewer` field from stream online notification as it is (almost?) always 0.
## [4.3.6] - 08.09.2022
### Added
- Added `.expraddserver` (.exas) which will server as a server-only alternative to '.exa' in case users want to override default Admin permissions with .dpo
- Added .banprune command which sets how many days worth of messages will be pruned when bot (soft)bans a person either through a command or another punishment feature.
- Added .qdelauth - Delete all quotes by the specified author on this server. If you target yourself - no permission required
- Added `.timeout` command
- Added an option to award currency based on received xp
### Changed
- Reminders now have embed support, but plaintext field is not supported.
- User friendlier errors when parsing a number in a command fails
### Fixed
- Awarded xp is now correctly used in level up calculations
## [4.3.5] - 17.08.2022
### Added
- Added a 'Use' button when a user already owns an item
- Added a 'Pull Again' button to slots
- Added `.roleinfo` command
- Added `.emojiremove` command
- Added `.threadcreate` and `.threaddelete` commands
- Added `.bank seize` / `.bank award` owner only commands
### Changed
- Running a .timely command early now shows a pending color
- .xp system is once again no longer opt in for servers
- It's still opt-in for global and requires users to run .xp at least once in order to start gaining global xp
### Fixed
- Fixed users not getting club xp
## [4.3.4] - 07.08.2022
### Fixed
- Fixed users getting XP out of nowhere while voice xp is enabled
## [4.3.3] - 06.08.2022
@@ -15,7 +118,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.
### Changed
- Updated position of Username and Club name on the .xp card
- Improved text visibility on the .xp card
- Improved text visibility on the .xp card
### Fixed
@@ -88,7 +191,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.
- [dev] No longer using generator and partial methods for commands
### Fixed
- `.slot` will now show correct multipliers if they've been modified
- Fix patron errors showing up even with permissions disabling the command
- Fixed an issue with voice xp breaking xp gain.
@@ -143,14 +246,14 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.
### Fixed
- Fixed `.draw` command
- Fixed `.draw` command
## [4.2.10] - 29.06.2022
- Fixed currency generation working only once
## [4.2.9] - 25.06.2022
### Fixed
- Fixed `creds_example.yml` misssing from output directory
@@ -310,7 +413,7 @@ Added `.patron` and `.patronmessage` commands
- `ytdataapi` will use the official google api (requires `GoogleApiKey` specified in `creds.yml`) and YoutubeDataApi enabled in the dev console
- `ytdl` will use `youtube-dl` program from the host machine. It must be downloaded and it's location must be added to path env variable.
- `ytdlp` will use `yt-dlp` program from the host machine. Same as `youtube-dl` - must be in path env variable.
- `invidious` will use one of invidious instances specified in the `invidiousInstances` property. Very good.
- `invidious` will use one of invidious instances specified in the `invidiousInstances` property. Very good.
- `.google`, `.youtube` and `.image` moved to the new Search group
@@ -330,19 +433,19 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- `.feed` urls which error for more than 100 times will be automatically removed.
- `.ve` is now enabled by default
- [dev] nadeko interaction slightly improved to make it less nonsense (they still don't make sense)
- [dev] RewardedUsers table slightly changed to make it more general
- [dev] renamed `// todo`s which aren't planned soon to `// FUTURE`
- [dev] currency rewards have been reimplemented and moved to a separate service
- [dev] nadeko interaction slightly improved to make it less nonsense (they still don't make sense)
- [dev] RewardedUsers table slightly changed to make it more general
- [dev] renamed `// todo`s which aren't planned soon to `// FUTURE`
- [dev] currency rewards have been reimplemented and moved to a separate service
### Fixed
- `.rh` no longer needs quotes for multi word roles
- `.deletexp` will now properly delete server xp too
- Fixed `.crypto` sparklines
- [dev] added support for configs to properly parse enums without case sensitivity (ConfigParsers.InsensitiveEnum)
- [dev] Fixed a bug in .gencmdlist
- [dev] small fixes to creds provider
- [dev] Fixed a bug in .gencmdlist
- [dev] small fixes to creds provider
### Removed
@@ -375,7 +478,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
## [4.1.3] - 06.05.2022
### Added
### Added
- Added support for embed arrays in commands such as .say, .greet, .bye, etc...
- Website to create them is live at eb.nadeko.bot (old one is moved to oldeb.nadeko.bot)
@@ -388,18 +491,18 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- 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.
- Added `.h <command group>`
- Added `.h <command group>`
- Using this command will list all commands in the specified group
- Atm only .bank is a proper group (`.h bank`)
- Added "Bank Accounts" entry to `.economy`
### Changed
- Reaction roles rewritten completely
- Supports multiple exclusivity groups per message
- Reaction roles rewritten completely
- Supports multiple exclusivity groups per message
- Supports level requirements
- However they can only be added one by one
- Use the following commands for more information
- Use the following commands for more information
- `.h .reroa`
- `.h .reroli`
- `.h .rerot`
@@ -430,7 +533,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- To change the db nadeko will use, simply change the `db type` in `creds.yml`
- There is no migration code right now, which means that if you want to switch to another system you'll either have to manually export/import your database or start fresh
- Medusa system
- A massive new feature which allows developers to create custom modules/plugins/cogs
- A massive new feature which allows developers to create custom modules/plugins/cogs
- They can be load/unloaded/updated at runtime without restarting the bot
### Changed
@@ -466,7 +569,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Fixed
- Fixed the `id` which shows up when you add a new Expression
- Fixed some strings which were still referring to "CustomReaction(s)" instead of "Expression(s)"
- Fixed some strings which were still referring to "CustomReaction(s)" instead of "Expression(s)"
## [4.0.3] - 04.03.2022
@@ -492,20 +595,20 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Added
- Added `.deleteemptyservers` command
- Added `.curtr <id>` which lets you see full information about one of your own transactions with the specified id
- Added trovo.live support for stream notifications (`.stadd`)
- Added trovo.live support for stream notifications (`.stadd`)
- Added unclaimed waifu decay functionality
- Added 3 new settings to `data/gambling.yml` to control it:
- waifu.decay.percent - How much % to subtract from unclaimed waifu
- waifu.decay.hourInterval - How often to decay the price
- waifu.decay.hourInterval - How often to decay the price
- waifu.decay.minPrice - Unclaimed waifus with price lower than the one specified here will not be affected by the decay
- Added `currency.transactionsLifetime` to `data/gambling.yml` Any transaction older than the number of days specified will be automatically deleted
- Added `.stock` command to check stock prices and charts
- Re-added `.qap / .queueautoplay`
- Re-added `.qap / .queueautoplay`
### Changed
- CustomReactions module (and customreactions db table) has been 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)
- Expression command now start with ex/expr and end with the name of the action or setting.
- 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)
- Expression command now start with ex/expr and end with the name of the action or setting.
- For example `.exd` (`.dcr`) is expression delete, `.exa` (`.acr`)
- Permissions (`.lp`) be automatically updated with "ACTUALEXPRESSIONS", "EXPRESSIONS" instead of "ACTUALCUSTOMREACTIONS" and "CUSTOMREACTIONS"
- Permissions for `.ecr` (now `.exe`), `.scr` (now `.exs`), `.dcr` (now `.exd`), `.acr` (now `.exa`), `.lcr` (now `.exl`) will be automatically updated
@@ -522,8 +625,8 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- [dev] Added Type, Extra, OtherId fields to the database
- [dev] 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)
- [dev] Reorganized module and submodule folders
- [dev] Permissionv2 db table renamed to Permissions
- [dev] Reorganized module and submodule folders
- [dev] Permissionv2 db table renamed to Permissions
- [dev] Moved FilterWordsChannelId to a separate table
### Fixed
@@ -538,9 +641,9 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Fixed embed color when disabling `.antialt`
### Removed
- Removed `.bce` - use `.config` or `.config bot` specifically for bot config
- Removed obsolete placeholders: %users% %servers% %userfull% %username% %userdiscrim% %useravatar% %id% %uid% %chname% %cid% %sid% %members% %server_time% %shardid% %time% %mention%
- Removed some obsolete commands and strings
- Removed `.bce` - use `.config` or `.config bot` specifically for bot config
- Removed obsolete placeholders: %users% %servers% %userfull% %username% %userdiscrim% %useravatar% %id% %uid% %chname% %cid% %sid% %members% %server_time% %shardid% %time% %mention%
- Removed some obsolete commands and strings
- Removed code which migrated 2.x to v3 credentials, settings, etc...
## [3.0.13] - 14.01.2022
@@ -579,7 +682,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Looks much nicer
- Bot will now reply to user messages with a translation if `del` is disabled
- Bot will make an embed with original and translated text with user avatar and name if `del` is enabled
- If the bot is unable to delete messages while having `del` enabled, it will reset back to the no-del behavior for the current session
- If the bot is unable to delete messages while having `del` enabled, it will reset back to the no-del behavior for the current session
### Fixed
- `.crypto` now supports top 5000 coins
@@ -593,7 +696,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Fixed
- `.xprewsreset` now has correct permissions
### Removed
### Removed
- Removed slot.numbers from `images.yml` as they're no longer used
## [3.0.9] - 21.11.2021
@@ -603,7 +706,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Added
- Added `.emojiadd` with 3 overloads
- `.ea :customEmoji:` which copies another server's emoji
- `.ea :customEmoji:` which copies another server's emoji
- `.ea newName :customEmoji:` which copies emoji under a different name
- `.ea emojiName <imagelink.png>` which creates a new emoji from the specified image
- Patreon Access and Refresh Tokens should now be automatically updated once a month as long as the user has provided the necessary credentials in creds.yml file:
@@ -617,7 +720,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
## [3.0.8] - 03.11.2021
### Added
### Added
- Created VotesApi project nad re-worked vote rewards handling
- Updated votes entries in creds.yml with explanations on how to set up vote links
@@ -642,10 +745,10 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- They are called negative gifts
- They show up at the end of the `.gifts` page and are marked with a broken heart
- They have a separate multiplier (`waifu.multi.negative_gift_effect` default 0.5, changeable via `.config gambling` or `data/gambling.yml`)
- When gifted, the waifu's price will be reduced by the `price * multiplier`
- When gifted, the waifu's price will be reduced by the `price * multiplier`
- Negative gifts don't show up in `.waifuinfo` nor is the record of them kept in the database
### Fixed
### Fixed
- Fixed `%users%` and `%shard.usercount%` placeholders not showing correct values
## [3.0.6] - 27.09.2021
@@ -686,7 +789,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Possible fix for `.repeat` bug
- Slight adjustment for repeater logic
- Timer should no longer increase on some repeaters
- Repeaters should no longer have periods when they're missing from the list
- Repeaters should no longer have periods when they're missing from the list
- Fixed several commands which used error color for success confirmation messages
## [3.0.3] - 15.09.2021
@@ -747,7 +850,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Explanations on how to get the keys are added as the comments
- Code cleanup
- Command attributes cleaned up
- Removed dummy Remarks and Usages attributes as hey were unused for a few patches but stayed in the code to avoid big git diffsmigration code has ran and it can be safely removed
- Removed dummy Remarks and Usages attributes as hey were unused for a few patches but stayed in the code to avoid big git diffsmigration code has ran and it can be safely removed
- There are 2 projects: NadekoBot and NadekoBot.Coordinator
- You can directly run NadekoBot as the regular bot with one shard
- Run NadekoBot.Coordinator if you want more control over your shards and a grpc api for coordinator with which you can start, restart, kill and see status of shards
@@ -768,7 +871,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
## [2.46.2] - 14.07.2021
### Fixed
### Fixed
- Fixed .save for local songs
- Fixed .lq for local songs if the song names are too long
@@ -839,7 +942,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Added
- Added `.crsexport` and `.crsimport`
- Added `.crsexport` and `.crsimport`
- Allows for quick export/import of server or global custom reactions
- Requires admin permissions for server crs, and owner for global crs
- Explanation of the fields is in the comment at the top of the `.crsexport` .yml file
@@ -872,7 +975,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
### Added
- Re-added `%music.playing%` and `%music.queued%` (#290)
- Added `%music.servers%` which shows how many servers have a song queued up to play
- Added `%music.servers%` which shows how many servers have a song queued up to play
^ Only available to `.ropl` / `.adpl` feature atm
- `.autodc` re-added
- `.qrp`, `.vol`, `.smch` `.autodc` will now persist
@@ -892,7 +995,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Removing last song in the queue will no longer reset queue index
- Having `.rpl` disabled will now correctly stop after the last song, closes #292
### Removed
### Removed
- `.sad` removed. It's more or less useless. Use `.qrp` and `.autodc` now for similar effect
@@ -907,7 +1010,7 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Minor perf improvement for filter checks
### Fixed
### Fixed
- `.qs` result urls are now valid
- Custom reactions with "`-`" as a response should once again disable that custom reaction completely
@@ -923,8 +1026,8 @@ Note: Results of each `.youtube` query will be cached for 1 hour to improve perf
- Much faster starting and skipping once the songs are in the queue
- Higher quality audio (no stuttering too!)
- Local tracks will now have durations if you have ffprobe installed (comes with ffmpeg)
- Bot supports joining a different vc without skipping the song if you use `.j`
- ⚠️ **DO NOT DRAG THE BOT** to another vc, as it's not properly supported atm, and you will have to do `.play` after dragging it)
- Bot supports joining a different vc without skipping the song if you use `.j`
- ⚠️ **DO NOT DRAG THE BOT** to another vc, as it's not properly supported atm, and you will have to do `.play` after dragging it)
- `.j` makes the bot join your voice channel
- `.p` is now alias of play, pause is `.pause`
- `.qs` should work without google api key now for most users as it is using a custom loader

View File

@@ -1,8 +1,3 @@
[![Discord](https://discordapp.com/api/guilds/117523346618318850/widget.png)](https://discord.gg/nadekobot)
[![Documentation Status](https://readthedocs.org/projects/nadekobot/badge/?version=latest)](http://nadekobot.readthedocs.io/en/v4/?badge=v4)
[![Discord Bots](https://discordbots.org/api/widget/status/116275390695079945.svg)](https://top.gg/bot/116275390695079945)
[![nadeko0](https://cdn.nadeko.bot/tutorial/docs-top.png)](https://nadeko.bot/)
[![nadeko1](https://cdn.nadeko.bot/tutorial/docs-mid.png)](https://invite.nadeko.bot/)

View File

@@ -33,17 +33,17 @@ These are required for a number of features to function properly, and all should
For a single owner, it should look like this:
```yml
OwnerIds:
- 105635576866156544
OwnerIds:
- 105635576866156544
```
For multiple owners, it should look like this:
```yml
OwnerIds:
- 105635123466156544
- 145521851676884992
- 341420590009417729
OwnerIds:
- 105635123466156544
- 145521851676884992
- 341420590009417729
```

View File

@@ -1,4 +1,4 @@
# Setting up NadekoBot on Linux
w# Setting up NadekoBot on Linux
| Table of Contents |
| :-------------------------------------------------- |
@@ -17,7 +17,7 @@ It is recommended that you use **Ubuntu 20.04**, as there have been nearly no pr
##### Compatible operating systems:
- Ubuntu: 16.04, 18.04, 20.04, 21.04, 21.10 22.04
- Ubuntu: 16.04, 18.04, 20.04, 21.04, 21.10, 22.04
- Mint: 19, 20
- Debian: 9, 10
- CentOS: 7
@@ -160,15 +160,30 @@ If you are presented with the installer main menu, exit it by choosing Option `8
The above command will create a new session named **nadeko** *(you can replace “nadeko” with anything you prefer, it's your session name)*.
2. Navigate to the project's root directory
- Project root directory location example: `cd /home/user/nadekobot/`
3. Enter the `output` directory:
- `cd output`
4. Run the bot using:
- `dotnet NadekoBot.dll`
5. Detatch the tmux session:
2. Run the installer: `bash linuxAIO.sh`
3. There are a few options when it comes to running Nadeko.
- Run `3` to *Run the bot normally*
- Run `4` to *Run the bot with Auto Restart* (This is may or may not work)
4. If option `4` was selected, you have the following options
```
1. Run Auto Restart normally without updating NadekoBot.
2. Run Auto Restart and update NadekoBot.
3. Exit
Choose:
[1] to Run NadekoBot with Auto Restart on "die" command without updating.
[2] to Run with Auto Updating on restart after using "die" command.
```
- Run `1` to update the bot upon restart. (This is done using the `.die` command)
- Run `2` to restart the bot without updating. (This is also done using the `.die` command)
5. That's it! to detatch the tmux session:
- Press `Ctrl` + `B`
- Then press `D`
Now check your Discord server, the bot should be online. Nadeko should now be running in the background of your system.
To re-open the tmux session to either update, restart, or whatever, execute `tmux a -t nadeko`. *(Make sure to replace "nadeko" with your session name. If you didn't change it, leave it as it.)*
@@ -301,6 +316,26 @@ This method is similar to the one above, but requires one extra step, with the a
If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (by using this link, you will get **$10 credit** and also support Nadeko)
To set up the VPS, please select the options below
```
These are the min requirements you must follow:
OS: Any between Ubuntu, Fedora, and Debian
Plan: Basic
CPU options: regular with SSD
1 GB / 1 CPU
25 GB SSD Disk
1000 GB transfer
Note: You can select the cheapest option with 512 MB /1 CPU but this has been a hit or miss.
Datacenter region: Choose one depending on where you are located.
Authentication: Password or SSH
(Select SSH if you know what you are doing, otherwise choose password)
```
**Setting up NadekoBot**
Assuming you have followed the link above to setup an account and a Droplet with a 64-bit operational system on Digital Ocean and got the `IP address and root password (in your e-mail)` to login, it's time to get started.

View File

@@ -1,5 +1,8 @@
namespace Nadeko.Econ.Gambling;
//here is a payout chart
//https://lh6.googleusercontent.com/-i1hjAJy_kN4/UswKxmhrbPI/AAAAAAAAB1U/82wq_4ZZc-Y/DE6B0895-6FC1-48BE-AC4F-14D1B91AB75B.jpg
//thanks to judge for helping me with this
public class SlotGame
{
private static readonly NadekoRandom _rng = new NadekoRandom();

View File

@@ -10,6 +10,7 @@ public interface IEmbedBuilder
IEmbedBuilder WithFooter(string text, string? iconUrl = null);
IEmbedBuilder WithAuthor(string name, string? iconUrl = null, string? url = null);
IEmbedBuilder WithColor(EmbedColor color);
IEmbedBuilder WithDiscordColor(Color color);
Embed Build();
IEmbedBuilder WithUrl(string url);
IEmbedBuilder WithImageUrl(string url);

View File

@@ -12,9 +12,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Discord.Net.Core" Version="3.103.0" />
<PackageReference Include="Discord.Net.Core" Version="3.104.0" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="YamlDotNet" Version="11.2.1" />
</ItemGroup>
<PropertyGroup Condition=" '$(Version)' == '' ">
<Version>5.0.0</Version>
</PropertyGroup>
</Project>

View File

@@ -3,14 +3,12 @@ using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Common.Configs;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Db;
using NadekoBot.Modules.Administration;
using NadekoBot.Modules.Utility;
using NadekoBot.Services.Database.Models;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Net;
using System.Reflection;
using Nadeko.Common;
using RunMode = Discord.Commands.RunMode;
namespace NadekoBot;
@@ -118,10 +116,6 @@ public sealed class Bot
// cache
.AddCache(_creds);
// admin
#if GLOBAL_NADEKO
svcs.AddSingleton<ILogCommandService, DummyLogCommandService>();
#endif
svcs.AddHttpClient();
svcs.AddHttpClient("memelist")

View File

@@ -0,0 +1,8 @@
namespace NadekoBot;
public interface INadekoInteractionService
{
public NadekoInteraction Create<T>(
ulong userId,
SimpleInteraction<T> inter);
}

View File

@@ -1,29 +0,0 @@
namespace NadekoBot;
public sealed class NadekoButtonActionInteraction : NadekoButtonOwnInteraction
{
private readonly NadekoInteractionData _data;
private readonly Func<SocketMessageComponent, Task> _action;
public NadekoButtonActionInteraction(
DiscordSocketClient client,
ulong authorId,
NadekoInteractionData data,
Func<SocketMessageComponent, Task> action
)
: base(client, authorId)
{
_data = data;
_action = action;
}
protected override string Name
=> _data.CustomId;
protected override IEmote Emote
=> _data.Emote;
protected override string? Text
=> _data.Text;
public override Task ExecuteOnActionAsync(SocketMessageComponent smc)
=> _action(smc);
}

View File

@@ -1,25 +1,30 @@
namespace NadekoBot;
public abstract class NadekoButtonInteraction
public sealed class NadekoInteraction
{
// improvements:
// - state in OnAction
// - configurable delay
// -
protected abstract string Name { get; }
protected abstract IEmote Emote { get; }
protected virtual string? Text { get; } = null;
private readonly ulong _authorId;
private readonly ButtonBuilder _button;
private readonly Func<SocketMessageComponent, Task> _onClick;
private readonly bool _onlyAuthor;
public DiscordSocketClient Client { get; }
protected readonly TaskCompletionSource<bool> _interactionCompletedSource;
private readonly TaskCompletionSource<bool> _interactionCompletedSource;
protected IUserMessage message = null!;
private IUserMessage message = null!;
protected NadekoButtonInteraction(DiscordSocketClient client)
public NadekoInteraction(DiscordSocketClient client,
ulong authorId,
ButtonBuilder button,
Func<SocketMessageComponent, Task> onClick,
bool onlyAuthor)
{
Client = client;
_authorId = authorId;
_button = button;
_onClick = onClick;
_onlyAuthor = onlyAuthor;
_interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
Client = client;
}
public async Task RunAsync(IUserMessage msg)
@@ -27,29 +32,25 @@ public abstract class NadekoButtonInteraction
message = msg;
Client.InteractionCreated += OnInteraction;
await Task.WhenAny(Task.Delay(10_000), _interactionCompletedSource.Task);
await Task.WhenAny(Task.Delay(15_000), _interactionCompletedSource.Task);
Client.InteractionCreated -= OnInteraction;
await msg.ModifyAsync(m => m.Components = new ComponentBuilder().Build());
}
protected abstract ValueTask<bool> Validate(SocketMessageComponent smc);
private async Task OnInteraction(SocketInteraction arg)
private Task OnInteraction(SocketInteraction arg)
{
if (arg is not SocketMessageComponent smc)
return;
return Task.CompletedTask;
if (smc.Message.Id != message.Id)
return;
return Task.CompletedTask;
if (smc.Data.CustomId != Name)
return;
if (_onlyAuthor && smc.User.Id != _authorId)
return Task.CompletedTask;
if (!await Validate(smc))
{
await smc.DeferAsync();
return;
}
if (smc.Data.CustomId != _button.CustomId)
return Task.CompletedTask;
_ = Task.Run(async () =>
{
@@ -63,21 +64,19 @@ public abstract class NadekoButtonInteraction
await smc.DeferAsync();
}
});
return Task.CompletedTask;
}
public virtual MessageComponent CreateComponent()
public MessageComponent CreateComponent()
{
var comp = new ComponentBuilder()
.WithButton(GetButtonBuilder());
.WithButton(_button);
return comp.Build();
}
public ButtonBuilder GetButtonBuilder()
=> new ButtonBuilder(style: ButtonStyle.Secondary, emote: Emote, customId: Name, label: Text);
public abstract Task ExecuteOnActionAsync(SocketMessageComponent smc);
}
// this is all so wrong ...
public Task ExecuteOnActionAsync(SocketMessageComponent smc)
=> _onClick(smc);
}

View File

@@ -1,43 +0,0 @@
// namespace NadekoBot;
//
// public class NadekoButtonInteractionArray : NadekoButtonInteraction
// {
// private readonly ButtonBuilder[] _bbs;
// private readonly NadekoButtonInteraction[] _inters;
//
// public NadekoButtonInteractionArray(params NadekoButtonInteraction[] inters)
// : base(inters[0].Client)
// {
// _inters = inters;
// _bbs = inters.Map(x => x.GetButtonBuilder());
// }
//
// protected override string Name
// => throw new NotSupportedException();
// protected override IEmote Emote
// => throw new NotSupportedException();
//
// protected override ValueTask<bool> Validate(SocketMessageComponent smc)
// => new(true);
//
// public override Task ExecuteOnActionAsync(SocketMessageComponent smc)
// {
// for (var i = 0; i < _bbs.Length; i++)
// {
// if (_bbs[i].CustomId == smc.Data.CustomId)
// return _inters[i].ExecuteOnActionAsync(smc);
// }
//
// return Task.CompletedTask;
// }
//
// public override MessageComponent CreateComponent()
// {
// var comp = new ComponentBuilder();
//
// foreach (var bb in _bbs)
// comp.WithButton(bb);
//
// return comp.Build();
// }
// }

View File

@@ -1,42 +0,0 @@
namespace NadekoBot;
/// <summary>
/// Builder class for NadekoInteractions
/// </summary>
public class NadekoInteractionBuilder
{
private NadekoInteractionData? iData;
private Func<SocketMessageComponent, Task>? action;
// private bool isOwn;
public NadekoInteractionBuilder WithData<T>(in T data)
where T : NadekoInteractionData
{
iData = data;
return this;
}
// public NadekoOwnInteractionBuiler WithIsOwn(bool isOwn = true)
// {
// this.isOwn = isOwn;
// return this;
// }
public NadekoInteractionBuilder WithAction(in Func<SocketMessageComponent, Task> fn)
{
this.action = fn;
return this;
}
public NadekoButtonActionInteraction Build(DiscordSocketClient client, ulong userId)
{
if (iData is null)
throw new InvalidOperationException("You have to specify the data before building the interaction");
if (action is null)
throw new InvalidOperationException("You have to specify the action before building the interaction");
return new(client, userId, iData, action);
}
}

View File

@@ -0,0 +1,20 @@
namespace NadekoBot;
public class NadekoInteractionService : INadekoInteractionService, INService
{
private readonly DiscordSocketClient _client;
public NadekoInteractionService(DiscordSocketClient client)
{
_client = client;
}
public NadekoInteraction Create<T>(
ulong userId,
SimpleInteraction<T> inter)
=> new NadekoInteraction(_client,
userId,
inter.Button,
inter.TriggerAsync,
onlyAuthor: true);
}

View File

@@ -1,15 +0,0 @@
namespace NadekoBot;
/// <summary>
/// Interaction which only the author can use
/// </summary>
public abstract class NadekoButtonOwnInteraction : NadekoButtonInteraction
{
protected readonly ulong _authorId;
protected NadekoButtonOwnInteraction(DiscordSocketClient client, ulong authorId) : base(client)
=> _authorId = authorId;
protected override ValueTask<bool> Validate(SocketMessageComponent smc)
=> new(smc.User.Id == _authorId);
}

View File

@@ -1,26 +0,0 @@
namespace NadekoBot.Common;
public abstract class NInteraction
{
private readonly DiscordSocketClient _client;
private readonly ulong _userId;
private readonly Func<SocketMessageComponent, Task> _action;
protected abstract NadekoInteractionData Data { get; }
public NInteraction(
DiscordSocketClient client,
ulong userId,
Func<SocketMessageComponent, Task> action)
{
_client = client;
_userId = userId;
_action = action;
}
public NadekoButtonInteraction GetInteraction()
=> new NadekoInteractionBuilder()
.WithData(Data)
.WithAction(_action)
.Build(_client, _userId);
}

View File

@@ -18,6 +18,7 @@ public abstract class NadekoModule : ModuleBase
public CommandHandler _cmdHandler { get; set; }
public ILocalization _localization { get; set; }
public IEmbedBuilderService _eb { get; set; }
public INadekoInteractionService _inter { get; set; }
protected string prefix
=> _cmdHandler.GetPrefix(ctx.Guild);
@@ -36,7 +37,7 @@ public abstract class NadekoModule : ModuleBase
string error,
string url = null,
string footer = null,
NadekoButtonInteraction inter = null)
NadekoInteraction inter = null)
=> ctx.Channel.SendErrorAsync(_eb, title, error, url, footer);
public Task<IUserMessage> SendConfirmAsync(
@@ -47,32 +48,32 @@ public abstract class NadekoModule : ModuleBase
=> ctx.Channel.SendConfirmAsync(_eb, title, text, url, footer);
//
public Task<IUserMessage> SendErrorAsync(string text, NadekoButtonInteraction inter = null)
public Task<IUserMessage> SendErrorAsync(string text, NadekoInteraction inter = null)
=> ctx.Channel.SendAsync(_eb, text, MessageType.Error, inter);
public Task<IUserMessage> SendConfirmAsync(string text, NadekoButtonInteraction inter = null)
public Task<IUserMessage> SendConfirmAsync(string text, NadekoInteraction inter = null)
=> ctx.Channel.SendAsync(_eb, text, MessageType.Ok, inter);
public Task<IUserMessage> SendPendingAsync(string text, NadekoButtonInteraction inter = null)
public Task<IUserMessage> SendPendingAsync(string text, NadekoInteraction inter = null)
=> ctx.Channel.SendAsync(_eb, text, MessageType.Pending, inter);
// localized normal
public Task<IUserMessage> ErrorLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> ErrorLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendErrorAsync(GetText(str), inter);
public Task<IUserMessage> PendingLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> PendingLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendPendingAsync(GetText(str), inter);
public Task<IUserMessage> ConfirmLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> ConfirmLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendConfirmAsync(GetText(str), inter);
// localized replies
public Task<IUserMessage> ReplyErrorLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> ReplyErrorLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendErrorAsync($"{Format.Bold(ctx.User.ToString())} {GetText(str)}", inter);
public Task<IUserMessage> ReplyPendingLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> ReplyPendingLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendPendingAsync($"{Format.Bold(ctx.User.ToString())} {GetText(str)}", inter);
public Task<IUserMessage> ReplyConfirmLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
public Task<IUserMessage> ReplyConfirmLocalizedAsync(LocStr str, NadekoInteraction inter = null)
=> SendConfirmAsync($"{Format.Bold(ctx.User.ToString())} {GetText(str)}", inter);
public async Task<bool> PromptUserConfirmAsync(IEmbedBuilder embed)

View File

@@ -0,0 +1,33 @@
namespace NadekoBot.Common.TypeReaders;
public sealed class GuildUserTypeReader : NadekoTypeReader<IGuildUser>
{
public override async ValueTask<TypeReaderResult<IGuildUser>> ReadAsync(ICommandContext ctx, string input)
{
if (ctx.Guild is null)
return TypeReaderResult.FromError<IGuildUser>(CommandError.Unsuccessful, "Must be in a guild.");
input = input.Trim();
IGuildUser? user = null;
if (MentionUtils.TryParseUser(input, out var id))
user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload);
if (ulong.TryParse(input, out id))
user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload);
if (user is null)
{
var users = await ctx.Guild.GetUsersAsync(CacheMode.CacheOnly);
user = users.FirstOrDefault(x => x.Username == input)
?? users.FirstOrDefault(x =>
string.Equals(x.ToString(), input, StringComparison.InvariantCultureIgnoreCase))
?? users.FirstOrDefault(x =>
string.Equals(x.Username, input, StringComparison.InvariantCultureIgnoreCase));
}
if (user is null)
return TypeReaderResult.FromError<IGuildUser>(CommandError.ObjectNotFound, "User not found.");
return TypeReaderResult.FromSuccess(user);
}
}

View File

@@ -1,4 +1,5 @@
#nullable disable
using LinqToDB.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
@@ -6,12 +7,14 @@ namespace NadekoBot.Db;
public static class CurrencyTransactionExtensions
{
public static List<CurrencyTransaction> GetPageFor(this DbSet<CurrencyTransaction> set, ulong userId, int page)
=> set.AsQueryable()
.AsNoTracking()
.Where(x => x.UserId == userId)
.OrderByDescending(x => x.DateAdded)
.Skip(15 * page)
.Take(15)
.ToList();
public static Task<List<CurrencyTransaction>> GetPageFor(
this DbSet<CurrencyTransaction> set,
ulong userId,
int page)
=> set.ToLinqToDBTable()
.Where(x => x.UserId == userId)
.OrderByDescending(x => x.DateAdded)
.Skip(15 * page)
.Take(15)
.ToListAsyncLinqToDB();
}

View File

@@ -49,7 +49,8 @@ public enum PunishmentAction
ChatMute,
VoiceMute,
AddRole,
Warn
Warn,
TimeOut
}
public class AntiSpamIgnore : DbEntity

View File

@@ -0,0 +1,9 @@
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db.Models;
public class AutoPublishChannel : DbEntity
{
public ulong GuildId { get; set; }
public ulong ChannelId { get; set; }
}

View File

@@ -5,4 +5,5 @@ public class BanTemplate : DbEntity
{
public ulong GuildId { get; set; }
public string Text { get; set; }
public int? PruneDays { get; set; }
}

View File

@@ -17,8 +17,6 @@ public class DiscordUser : DbEntity
public bool IsClubAdmin { get; set; }
public long TotalXp { get; set; }
public DateTime LastLevelUp { get; set; } = DateTime.UtcNow;
public DateTime LastXpGain { get; set; } = DateTime.MinValue;
public XpNotificationLocation NotifyOnLevelUp { get; set; }
public long CurrencyAmount { get; set; }

View File

@@ -0,0 +1,9 @@
#nullable disable
namespace NadekoBot.Services.Database.Models;
public class GamblingStats : DbEntity
{
public string Feature { get; set; }
public decimal Bet { get; set; }
public decimal PaidOut { get; set; }
}

View File

@@ -24,6 +24,7 @@ public class ShopEntry : DbEntity, IIndexed
//list
public HashSet<ShopEntryItem> Items { get; set; } = new();
public ulong? RoleRequirement { get; set; }
}
public class ShopEntryItem : DbEntity

View File

@@ -8,7 +8,6 @@ public class UserXpStats : DbEntity
public long Xp { get; set; }
public long AwardedXp { get; set; }
public XpNotificationLocation NotifyOnLevelUp { get; set; }
public DateTime LastLevelUp { get; set; } = DateTime.UtcNow;
}
public enum XpNotificationLocation { None, Dm, Channel }

View File

@@ -13,6 +13,6 @@ public class XpShopOwnedItem : DbEntity
public enum XpShopItemType
{
Background,
Frame,
Background = 0,
Frame = 1,
}

View File

@@ -10,10 +10,6 @@ public sealed class MysqlContext : NadekoContext
protected override string CurrencyTransactionOtherIdDefaultValue
=> "NULL";
protected override string DiscordUserLastXpGainDefaultValue
=> "(UTC_TIMESTAMP - INTERVAL 1 year)";
protected override string LastLevelUpDefaultValue
=> "(UTC_TIMESTAMP)";
public MysqlContext(string connStr = "Server=localhost", string version = "8.0")
{

View File

@@ -65,8 +65,6 @@ public abstract class NadekoContext : DbContext
#region Mandatory Provider-Specific Values
protected abstract string CurrencyTransactionOtherIdDefaultValue { get; }
protected abstract string DiscordUserLastXpGainDefaultValue { get; }
protected abstract string LastLevelUpDefaultValue { get; }
#endregion
@@ -166,12 +164,6 @@ public abstract class NadekoContext : DbContext
du.Property(x => x.NotifyOnLevelUp)
.HasDefaultValue(XpNotificationLocation.None);
du.Property(x => x.LastXpGain)
.HasDefaultValueSql(DiscordUserLastXpGainDefaultValue);
du.Property(x => x.LastLevelUp)
.HasDefaultValueSql(LastLevelUpDefaultValue);
du.Property(x => x.TotalXp)
.HasDefaultValue(0);
@@ -213,9 +205,6 @@ public abstract class NadekoContext : DbContext
})
.IsUnique();
xps.Property(x => x.LastLevelUp)
.HasDefaultValueSql(LastLevelUpDefaultValue);
xps.HasIndex(x => x.UserId);
xps.HasIndex(x => x.GuildId);
xps.HasIndex(x => x.Xp);
@@ -341,6 +330,10 @@ public abstract class NadekoContext : DbContext
#region BanTemplate
modelBuilder.Entity<BanTemplate>().HasIndex(x => x.GuildId).IsUnique();
modelBuilder.Entity<BanTemplate>()
.Property(x => x.PruneDays)
.HasDefaultValue(null)
.IsRequired(false);
#endregion
@@ -471,6 +464,22 @@ public abstract class NadekoContext : DbContext
});
#endregion
#region AutoPublish
modelBuilder.Entity<AutoPublishChannel>(apc => apc
.HasIndex(x => x.GuildId)
.IsUnique());
#endregion
#region GamblingStats
modelBuilder.Entity<GamblingStats>(gs => gs
.HasIndex(x => x.Feature)
.IsUnique());
#endregion
}
#if DEBUG

View File

@@ -8,10 +8,6 @@ public sealed class PostgreSqlContext : NadekoContext
protected override string CurrencyTransactionOtherIdDefaultValue
=> "NULL";
protected override string DiscordUserLastXpGainDefaultValue
=> "timezone('utc', now()) - interval '-1 year'";
protected override string LastLevelUpDefaultValue
=> "timezone('utc', now())";
public PostgreSqlContext(string connStr = "Host=localhost")
{

View File

@@ -9,10 +9,6 @@ public sealed class SqliteContext : NadekoContext
protected override string CurrencyTransactionOtherIdDefaultValue
=> "NULL";
protected override string DiscordUserLastXpGainDefaultValue
=> "datetime('now', '-1 years')";
protected override string LastLevelUpDefaultValue
=> "datetime('now')";
public SqliteContext(string connectionString = "Data Source=data/NadekoBot.db", int commandTimeout = 60)
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.Mysql
{
public partial class removeobsoletexpcolumns : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "lastlevelup",
table: "userxpstats");
migrationBuilder.DropColumn(
name: "lastlevelup",
table: "discorduser");
migrationBuilder.DropColumn(
name: "lastxpgain",
table: "discorduser");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "lastlevelup",
table: "userxpstats",
type: "datetime(6)",
nullable: false,
defaultValueSql: "(UTC_TIMESTAMP)");
migrationBuilder.AddColumn<DateTime>(
name: "lastlevelup",
table: "discorduser",
type: "datetime(6)",
nullable: false,
defaultValueSql: "(UTC_TIMESTAMP)");
migrationBuilder.AddColumn<DateTime>(
name: "lastxpgain",
table: "discorduser",
type: "datetime(6)",
nullable: false,
defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.Mysql
{
public partial class banprune : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "prunedays",
table: "bantemplates",
type: "int",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "prunedays",
table: "bantemplates");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.Mysql
{
public partial class shoprolereq : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<ulong>(
name: "rolerequirement",
table: "shopentry",
type: "bigint unsigned",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "rolerequirement",
table: "shopentry");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.Mysql
{
public partial class autopub : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "autopublishchannel",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_autopublishchannel", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "ix_autopublishchannel_guildid",
table: "autopublishchannel",
column: "guildid",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "autopublishchannel");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.Mysql
{
public partial class gamblingstats : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "gamblingstats",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
feature = table.Column<string>(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
bet = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
paidout = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_gamblingstats", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "ix_gamblingstats_feature",
table: "gamblingstats",
column: "feature",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "gamblingstats");
}
}
}

View File

@@ -19,6 +19,35 @@ namespace NadekoBot.Migrations.Mysql
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<ulong>("ChannelId")
.HasColumnType("bigint unsigned")
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("datetime(6)")
.HasColumnName("dateadded");
b.Property<ulong>("GuildId")
.HasColumnType("bigint unsigned")
.HasColumnName("guildid");
b.HasKey("Id")
.HasName("pk_autopublishchannel");
b.HasIndex("GuildId")
.IsUnique()
.HasDatabaseName("ix_autopublishchannel_guildid");
b.ToTable("autopublishchannel", (string)null);
});
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
{
b.Property<int>("Id")
@@ -168,18 +197,6 @@ namespace NadekoBot.Migrations.Mysql
.HasDefaultValue(false)
.HasColumnName("isclubadmin");
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)")
.HasColumnName("lastlevelup")
.HasDefaultValueSql("(UTC_TIMESTAMP)");
b.Property<DateTime>("LastXpGain")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)")
.HasColumnName("lastxpgain")
.HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)");
b.Property<int>("NotifyOnLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("int")
@@ -687,6 +704,10 @@ namespace NadekoBot.Migrations.Mysql
.HasColumnType("bigint unsigned")
.HasColumnName("guildid");
b.Property<int?>("PruneDays")
.HasColumnType("int")
.HasColumnName("prunedays");
b.Property<string>("Text")
.HasColumnType("longtext")
.HasColumnName("text");
@@ -1080,6 +1101,39 @@ namespace NadekoBot.Migrations.Mysql
b.ToTable("filterwordschannelid", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<decimal>("Bet")
.HasColumnType("decimal(65,30)")
.HasColumnName("bet");
b.Property<DateTime?>("DateAdded")
.HasColumnType("datetime(6)")
.HasColumnName("dateadded");
b.Property<string>("Feature")
.HasColumnType("varchar(255)")
.HasColumnName("feature");
b.Property<decimal>("PaidOut")
.HasColumnType("decimal(65,30)")
.HasColumnName("paidout");
b.HasKey("Id")
.HasName("pk_gamblingstats");
b.HasIndex("Feature")
.IsUnique()
.HasDatabaseName("ix_gamblingstats_feature");
b.ToTable("gamblingstats", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
{
b.Property<int>("Id")
@@ -2244,6 +2298,10 @@ namespace NadekoBot.Migrations.Mysql
.HasColumnType("longtext")
.HasColumnName("rolename");
b.Property<ulong?>("RoleRequirement")
.HasColumnType("bigint unsigned")
.HasColumnName("rolerequirement");
b.Property<int>("Type")
.HasColumnType("int")
.HasColumnName("type");
@@ -2565,12 +2623,6 @@ namespace NadekoBot.Migrations.Mysql
.HasColumnType("bigint unsigned")
.HasColumnName("guildid");
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)")
.HasColumnName("lastlevelup")
.HasDefaultValueSql("(UTC_TIMESTAMP)");
b.Property<int>("NotifyOnLevelUp")
.HasColumnType("int")
.HasColumnName("notifyonlevelup");

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.PostgreSql
{
public partial class banprune : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "prunedays",
table: "bantemplates",
type: "integer",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "prunedays",
table: "bantemplates");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations.PostgreSql
{
public partial class shoprolereq : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "rolerequirement",
table: "shopentry",
type: "numeric(20,0)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "rolerequirement",
table: "shopentry");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace NadekoBot.Migrations.PostgreSql
{
public partial class autopub : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "rolerequirement",
table: "shopentry",
type: "numeric(20,0)",
nullable: true);
migrationBuilder.CreateTable(
name: "autopublishchannel",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_autopublishchannel", x => x.id);
});
migrationBuilder.CreateIndex(
name: "ix_autopublishchannel_guildid",
table: "autopublishchannel",
column: "guildid",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "autopublishchannel");
migrationBuilder.DropColumn(
name: "rolerequirement",
table: "shopentry");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace NadekoBot.Migrations.PostgreSql
{
public partial class gamblingstats : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "gamblingstats",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
feature = table.Column<string>(type: "text", nullable: true),
bet = table.Column<decimal>(type: "numeric", nullable: false),
paidout = table.Column<decimal>(type: "numeric", nullable: false),
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_gamblingstats", x => x.id);
});
migrationBuilder.CreateIndex(
name: "ix_gamblingstats_feature",
table: "gamblingstats",
column: "feature",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "gamblingstats");
}
}
}

View File

@@ -22,6 +22,37 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<decimal>("ChannelId")
.HasColumnType("numeric(20,0)")
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
.HasColumnType("numeric(20,0)")
.HasColumnName("guildid");
b.HasKey("Id")
.HasName("pk_autopublishchannel");
b.HasIndex("GuildId")
.IsUnique()
.HasDatabaseName("ix_autopublishchannel_guildid");
b.ToTable("autopublishchannel", (string)null);
});
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
{
b.Property<int>("Id")
@@ -36,7 +67,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("balance");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("UserId")
@@ -101,7 +132,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Description")
@@ -163,7 +194,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("currencyamount");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Discriminator")
@@ -176,18 +207,6 @@ namespace NadekoBot.Migrations.PostgreSql
.HasDefaultValue(false)
.HasColumnName("isclubadmin");
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasColumnName("lastlevelup")
.HasDefaultValueSql("timezone('utc', now())");
b.Property<DateTime>("LastXpGain")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasColumnName("lastxpgain")
.HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'");
b.Property<int>("NotifyOnLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
@@ -243,7 +262,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -322,7 +341,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("amountcents");
b.Property<DateTime>("LastCharge")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("lastcharge");
b.Property<string>("UniquePlatformUserId")
@@ -330,7 +349,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("uniqueplatformuserid");
b.Property<DateTime>("ValidThru")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("validthru");
b.HasKey("UserId")
@@ -357,7 +376,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("MessageId")
@@ -388,7 +407,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("IsUsing")
@@ -471,7 +490,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("action");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("GuildConfigId")
@@ -518,7 +537,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.HasKey("Id")
@@ -544,7 +563,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("action");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("GuildConfigId")
@@ -595,7 +614,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("commandtext");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal?>("GuildId")
@@ -642,7 +661,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -676,7 +695,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Source")
@@ -710,13 +729,17 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
.HasColumnType("numeric(20,0)")
.HasColumnName("guildid");
b.Property<int?>("PruneDays")
.HasColumnType("integer")
.HasColumnName("prunedays");
b.Property<string>("Text")
.HasColumnType("text")
.HasColumnName("text");
@@ -741,7 +764,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("ItemId")
@@ -768,7 +791,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -806,7 +829,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("commandname");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -840,7 +863,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("amount");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Extra")
@@ -890,7 +913,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -924,7 +947,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("command");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal?>("GuildId")
@@ -955,7 +978,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("ItemId")
@@ -993,7 +1016,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("GuildConfigId")
@@ -1028,7 +1051,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1054,7 +1077,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1088,7 +1111,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1118,7 +1141,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1134,6 +1157,41 @@ namespace NadekoBot.Migrations.PostgreSql
b.ToTable("filterwordschannelid", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<decimal>("Bet")
.HasColumnType("numeric")
.HasColumnName("bet");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Feature")
.HasColumnType("text")
.HasColumnName("feature");
b.Property<decimal>("PaidOut")
.HasColumnType("numeric")
.HasColumnName("paidout");
b.HasKey("Id")
.HasName("pk_gamblingstats");
b.HasIndex("Feature")
.IsUnique()
.HasDatabaseName("ix_gamblingstats_feature");
b.ToTable("gamblingstats", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
{
b.Property<int>("Id")
@@ -1148,7 +1206,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1174,7 +1232,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("GuildConfigId")
@@ -1253,7 +1311,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("cleverbotenabled");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("DeleteMessageOnCommand")
@@ -1381,7 +1439,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("ItemType")
@@ -1420,7 +1478,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("LogSettingId")
@@ -1450,7 +1508,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -1493,7 +1551,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelupdatedid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -1629,7 +1687,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("authorid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Name")
@@ -1652,7 +1710,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1694,7 +1752,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("containsanywhere");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("DmResponse")
@@ -1733,7 +1791,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -1763,7 +1821,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -1825,7 +1883,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -1867,7 +1925,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("MusicPlaylistId")
@@ -1917,7 +1975,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -1948,7 +2006,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("Index")
@@ -1982,7 +2040,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("PollId")
@@ -2025,7 +2083,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("authorname");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -2068,7 +2126,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Emote")
@@ -2123,7 +2181,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("IsPrivate")
@@ -2143,7 +2201,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("userid");
b.Property<DateTime>("When")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("when");
b.HasKey("Id")
@@ -2169,7 +2227,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("channelid");
b.Property<DateTime>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
@@ -2216,11 +2274,11 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("amountrewardedthismonth");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<DateTime>("LastReward")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("lastreward");
b.Property<string>("PlatformUserId")
@@ -2251,7 +2309,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("Status")
@@ -2278,7 +2336,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("Group")
@@ -2323,7 +2381,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("authorid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2350,6 +2408,10 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnType("text")
.HasColumnName("rolename");
b.Property<decimal?>("RoleRequirement")
.HasColumnType("numeric(20,0)")
.HasColumnName("rolerequirement");
b.Property<int>("Type")
.HasColumnType("integer")
.HasColumnName("type");
@@ -2373,7 +2435,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("ShopEntryId")
@@ -2403,7 +2465,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2433,7 +2495,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2463,7 +2525,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("StreamRoleSettingsId")
@@ -2501,7 +2563,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("addroleid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("Enabled")
@@ -2540,7 +2602,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("StreamRoleSettingsId")
@@ -2574,7 +2636,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2582,7 +2644,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("guildconfigid");
b.Property<DateTime>("UnbanAt")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("unbanat");
b.Property<decimal>("UserId")
@@ -2608,7 +2670,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2616,7 +2678,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("guildconfigid");
b.Property<DateTime>("UnmuteAt")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("unmuteat");
b.Property<decimal>("UserId")
@@ -2642,7 +2704,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2654,7 +2716,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("roleid");
b.Property<DateTime>("UnbanAt")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("unbanat");
b.Property<decimal>("UserId")
@@ -2684,19 +2746,13 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("awardedxp");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<decimal>("GuildId")
.HasColumnType("numeric(20,0)")
.HasColumnName("guildid");
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasColumnName("lastlevelup")
.HasDefaultValueSql("timezone('utc', now())");
b.Property<int>("NotifyOnLevelUp")
.HasColumnType("integer")
.HasColumnName("notifyonlevelup");
@@ -2741,7 +2797,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -2783,7 +2839,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("claimerid");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<long>("Price")
@@ -2823,7 +2879,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<string>("ItemEmoji")
@@ -2857,7 +2913,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("NewId")
@@ -2901,7 +2957,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<bool>("Forgiven")
@@ -2963,7 +3019,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("count");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int?>("GuildConfigId")
@@ -3005,7 +3061,7 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnName("amount");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("Level")
@@ -3035,7 +3091,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("Level")
@@ -3074,7 +3130,7 @@ namespace NadekoBot.Migrations.PostgreSql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("dateadded");
b.Property<int>("GuildConfigId")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class removeobsoletexpcolumns : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLevelUp",
table: "UserXpStats");
migrationBuilder.DropColumn(
name: "LastLevelUp",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "LastXpGain",
table: "DiscordUser");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "LastLevelUp",
table: "UserXpStats",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now')");
migrationBuilder.AddColumn<DateTime>(
name: "LastLevelUp",
table: "DiscordUser",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now')");
migrationBuilder.AddColumn<DateTime>(
name: "LastXpGain",
table: "DiscordUser",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now', '-1 years')");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class banprune : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "PruneDays",
table: "BanTemplates",
type: "INTEGER",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PruneDays",
table: "BanTemplates");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class shoprolereq : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<ulong>(
name: "RoleRequirement",
table: "ShopEntry",
type: "INTEGER",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RoleRequirement",
table: "ShopEntry");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class autopub : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AutoPublishChannel",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AutoPublishChannel", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_AutoPublishChannel_GuildId",
table: "AutoPublishChannel",
column: "GuildId",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AutoPublishChannel");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class gamblingstats : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "GamblingStats",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Feature = table.Column<string>(type: "TEXT", nullable: true),
Bet = table.Column<decimal>(type: "TEXT", nullable: false),
PaidOut = table.Column<decimal>(type: "TEXT", nullable: false),
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_GamblingStats", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_GamblingStats_Feature",
table: "GamblingStats",
column: "Feature",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GamblingStats");
}
}
}

Some files were not shown because too many files have changed in this diff Show More