mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Compare commits
115 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e49e3eec69 | ||
|
3992ae392b | ||
|
8f0c5fab47 | ||
|
780a260b88 | ||
|
25692b9585 | ||
|
ed3ce52865 | ||
|
f5f0f1e250 | ||
|
9d9e61fdfb | ||
|
e68e948a80 | ||
|
cb98f4aa15 | ||
|
bfec0cbcbf | ||
|
3e1268f3bb | ||
|
c28f458972 | ||
|
27ac948463 | ||
|
3f9a3c4c18 | ||
|
9a5545a951 | ||
|
584193db18 | ||
|
1a132fd234 | ||
|
fd6a51ac82 | ||
|
eb1fabb2b7 | ||
|
d079e684bd | ||
|
bf817a1436 | ||
|
78f1624aaf | ||
|
793a49fc64 | ||
|
8b6be656b3 | ||
|
89a88304dc | ||
|
a7fe9ae08f | ||
|
0469705037 | ||
|
dc568fe0e2 | ||
|
eb01bb6c08 | ||
|
71a3539d0e | ||
|
c896a0cdb8 | ||
|
8effe817ad | ||
|
eedf6998b6 | ||
|
e6b7c31a72 | ||
|
2f77fd57b0 | ||
|
fda3d92134 | ||
|
fe6f28143b | ||
|
df3909fc55 | ||
|
9ffa701742 | ||
|
a4f7df8aee | ||
|
15e6cff14a | ||
|
e63ac07a52 | ||
|
a294e3bf8f | ||
|
a5b2fac69c | ||
|
a8e06a5ae4 | ||
|
761bdd8610 | ||
|
b5904889b0 | ||
|
5b4517cf5c | ||
|
72158c0a2c | ||
|
1ca6f6dc5c | ||
|
005fd7b8c6 | ||
|
3fc53b0609 | ||
|
62ec2241e4 | ||
|
75f8254a8e | ||
|
f23ffe0c67 | ||
|
d1a818542c | ||
|
15f67e3a51 | ||
|
412f346ac8 | ||
|
8107a80c4c | ||
|
f1c7d7437a | ||
|
9a013db25f | ||
|
6f75161c80 | ||
|
3f56e5b651 | ||
|
4875abbe86 | ||
|
83863f3a6c | ||
|
f07abad1ec | ||
|
b6909a4120 | ||
|
aaf7f04216 | ||
|
628871b0da | ||
|
a50ad09c8d | ||
|
1358ff50a4 | ||
|
ee9fede3b1 | ||
|
1d7e9e8471 | ||
|
d2fe7f8d11 | ||
|
75958efe17 | ||
|
7746d2aca1 | ||
|
e631df3326 | ||
|
ba44fdb55f | ||
|
59a1e56dad | ||
|
cd6fe46c2b | ||
|
fb4f470b44 | ||
|
b69e25edf4 | ||
|
9eae27bc15 | ||
|
bed36f8784 | ||
|
623f5ccd5e | ||
|
6da8201c2d | ||
|
d1c24d4721 | ||
|
7e5055268a | ||
|
e84e33b94f | ||
|
f21c96bdf4 | ||
|
430daf9b19 | ||
|
7c8756096d | ||
|
7d9e456fe5 | ||
|
948db31384 | ||
|
df1a775fec | ||
|
6c169e057b | ||
|
b164da38e3 | ||
|
dc229ea2b3 | ||
|
b853495d65 | ||
|
0ff02cede9 | ||
|
f7e0e635e6 | ||
|
a065189023 | ||
|
1affeb0683 | ||
|
6b3c9f01ca | ||
|
e9eb6ff2ad | ||
|
0170536d1c | ||
|
c65e769128 | ||
|
998779203a | ||
|
e0e4d697c3 | ||
|
e9c7293014 | ||
|
cf876a4148 | ||
|
6b9a858f28 | ||
|
38e3badb87 | ||
|
13d2fbd560 |
@@ -104,7 +104,7 @@ publish-medusa-package:
|
|||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- LAST_TAG=$(git describe --tags --abbrev=0)
|
- 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/
|
- cd src/Nadeko.Medusa/
|
||||||
- dotnet pack -c Release /p:Version=$MEDUSA_VERSION -o bin/Release/packed
|
- 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"
|
- dotnet nuget push bin/Release/packed/ --source https://www.myget.org/F/nadeko/api/v2/package --api-key "$MYGET_API_KEY"
|
||||||
|
132
CHANGELOG.md
132
CHANGELOG.md
@@ -2,7 +2,137 @@
|
|||||||
|
|
||||||
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
||||||
|
|
||||||
## Unreleased
|
## [4.3.10] - 10.11.2022
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `.filterlist` / `.fl` command which lists link and invite filtering channels and status
|
||||||
|
- Added support for `%target%` placeholder in `.alias` command
|
||||||
|
- Added .forwardtochannel which will forward messages to the current channel. It has lower priority than fwtoall
|
||||||
|
- Added .exprtoggleglobal / .extg which can be used to toggle usage of global expressions on the server
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- .meload and .meunload are now case sensitive. Previously loaded medusae may need to be reloaded or data/medusae/medusa.yml may need to be edited manually
|
||||||
|
- Several club related command have their error messages improved
|
||||||
|
- Updated help text for .antispam and .antiraid
|
||||||
|
- You can now specify time and date (time is optional) in `.remind` command instead of relative time, in the format `HH:mm dd.MM.YYYY`
|
||||||
|
- OwnerId will be automatically added to `creds.yml` at bot startup if it's missing
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.cmdcd` console error
|
||||||
|
- Fixed an error when currency is add per xp
|
||||||
|
- Fixed an issue preventing execution of expressions starting with @Bot when cleverbot is enabled on the server
|
||||||
|
- Fixed `.feedadd`
|
||||||
|
- Fixed `.prune @target` not working
|
||||||
|
- Medusa modules (sneks) should now inherit medusa description when listed in .mdls command
|
||||||
|
- Fixed command cooldown calculation
|
||||||
|
|
||||||
|
## [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
|
## [4.3.3] - 06.08.2022
|
||||||
|
|
||||||
|
@@ -1,8 +1,3 @@
|
|||||||
[](https://discord.gg/nadekobot)
|
|
||||||
[](http://nadekobot.readthedocs.io/en/v4/?badge=v4)
|
|
||||||
[](https://top.gg/bot/116275390695079945)
|
|
||||||
|
|
||||||
|
|
||||||
[](https://nadeko.bot/)
|
[](https://nadeko.bot/)
|
||||||
|
|
||||||
[](https://invite.nadeko.bot/)
|
[](https://invite.nadeko.bot/)
|
||||||
|
@@ -33,14 +33,14 @@ These are required for a number of features to function properly, and all should
|
|||||||
For a single owner, it should look like this:
|
For a single owner, it should look like this:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
OwnerIds:
|
OwnerIds:
|
||||||
- 105635576866156544
|
- 105635576866156544
|
||||||
```
|
```
|
||||||
|
|
||||||
For multiple owners, it should look like this:
|
For multiple owners, it should look like this:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
OwnerIds:
|
OwnerIds:
|
||||||
- 105635123466156544
|
- 105635123466156544
|
||||||
- 145521851676884992
|
- 145521851676884992
|
||||||
- 341420590009417729
|
- 341420590009417729
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# Setting up NadekoBot on Linux
|
w# Setting up NadekoBot on Linux
|
||||||
|
|
||||||
| Table of Contents |
|
| 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:
|
##### 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
|
- Mint: 19, 20
|
||||||
- Debian: 9, 10
|
- Debian: 9, 10
|
||||||
- CentOS: 7
|
- 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)*.
|
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
|
2. Run the installer: `bash linuxAIO.sh`
|
||||||
- Project root directory location example: `cd /home/user/nadekobot/`
|
|
||||||
3. Enter the `output` directory:
|
3. There are a few options when it comes to running Nadeko.
|
||||||
- `cd output`
|
|
||||||
4. Run the bot using:
|
- Run `3` to *Run the bot normally*
|
||||||
- `dotnet NadekoBot.dll`
|
- Run `4` to *Run the bot with Auto Restart* (This is may or may not work)
|
||||||
5. Detatch the tmux session:
|
|
||||||
|
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`
|
- Press `Ctrl` + `B`
|
||||||
- Then press `D`
|
- Then press `D`
|
||||||
|
|
||||||
Now check your Discord server, the bot should be online. Nadeko should now be running in the background of your system.
|
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.)*
|
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)
|
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**
|
**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.
|
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.
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ Open Terminal (if you don't know how to, click on the magnifying glass on the to
|
|||||||
###### Homebrew/wget
|
###### Homebrew/wget
|
||||||
*Skip this step if you already have homebrew installed*
|
*Skip this step if you already have homebrew installed*
|
||||||
- Copy and paste this command, then press Enter:
|
- Copy and paste this command, then press Enter:
|
||||||
- `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
|
- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
|
||||||
- Install wget
|
- Install wget
|
||||||
- `brew install wget`
|
- `brew install wget`
|
||||||
|
|
||||||
|
@@ -155,7 +155,7 @@ This section will guide you through how to create a simple custom medusa. You ca
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Base medusa package. You MUST reference this in order to have a working medusa -->
|
<!-- Base medusa package. You MUST reference this in order to have a working medusa -->
|
||||||
<!-- Also, this package comes from MyGet, which requires you to have a NuGet.Config file next to your .csproj -->
|
<!-- Also, this package comes from MyGet, which requires you to have a NuGet.Config file next to your .csproj -->
|
||||||
<PackageReference Include="Nadeko.Medusa" Version="1.0.1">
|
<PackageReference Include="Nadeko.Medusa" Version="4.3.9">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
namespace Nadeko.Econ.Gambling;
|
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
|
public class SlotGame
|
||||||
{
|
{
|
||||||
private static readonly NadekoRandom _rng = new NadekoRandom();
|
private static readonly NadekoRandom _rng = new NadekoRandom();
|
||||||
|
@@ -10,6 +10,7 @@ public interface IEmbedBuilder
|
|||||||
IEmbedBuilder WithFooter(string text, string? iconUrl = null);
|
IEmbedBuilder WithFooter(string text, string? iconUrl = null);
|
||||||
IEmbedBuilder WithAuthor(string name, string? iconUrl = null, string? url = null);
|
IEmbedBuilder WithAuthor(string name, string? iconUrl = null, string? url = null);
|
||||||
IEmbedBuilder WithColor(EmbedColor color);
|
IEmbedBuilder WithColor(EmbedColor color);
|
||||||
|
IEmbedBuilder WithDiscordColor(Color color);
|
||||||
Embed Build();
|
Embed Build();
|
||||||
IEmbedBuilder WithUrl(string url);
|
IEmbedBuilder WithUrl(string url);
|
||||||
IEmbedBuilder WithImageUrl(string url);
|
IEmbedBuilder WithImageUrl(string url);
|
||||||
|
@@ -12,9 +12,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<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="Serilog" Version="2.11.0" />
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(Version)' == '' ">
|
||||||
|
<Version>5.0.0</Version>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -3,14 +3,12 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using NadekoBot.Common.Configs;
|
using NadekoBot.Common.Configs;
|
||||||
using NadekoBot.Common.ModuleBehaviors;
|
using NadekoBot.Common.ModuleBehaviors;
|
||||||
using NadekoBot.Db;
|
using NadekoBot.Db;
|
||||||
using NadekoBot.Modules.Administration;
|
|
||||||
using NadekoBot.Modules.Utility;
|
using NadekoBot.Modules.Utility;
|
||||||
using NadekoBot.Services.Database.Models;
|
using NadekoBot.Services.Database.Models;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Nadeko.Common;
|
|
||||||
using RunMode = Discord.Commands.RunMode;
|
using RunMode = Discord.Commands.RunMode;
|
||||||
|
|
||||||
namespace NadekoBot;
|
namespace NadekoBot;
|
||||||
@@ -118,10 +116,6 @@ public sealed class Bot
|
|||||||
// cache
|
// cache
|
||||||
.AddCache(_creds);
|
.AddCache(_creds);
|
||||||
|
|
||||||
// admin
|
|
||||||
#if GLOBAL_NADEKO
|
|
||||||
svcs.AddSingleton<ILogCommandService, DummyLogCommandService>();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
svcs.AddHttpClient();
|
svcs.AddHttpClient();
|
||||||
svcs.AddHttpClient("memelist")
|
svcs.AddHttpClient("memelist")
|
||||||
@@ -319,10 +313,29 @@ public sealed class Bot
|
|||||||
await _commandService.AddModulesAsync(typeof(Bot).Assembly, Services);
|
await _commandService.AddModulesAsync(typeof(Bot).Assembly, Services);
|
||||||
// await _interactionService.AddModulesAsync(typeof(Bot).Assembly, Services);
|
// await _interactionService.AddModulesAsync(typeof(Bot).Assembly, Services);
|
||||||
IsReady = true;
|
IsReady = true;
|
||||||
|
|
||||||
|
await EnsureBotOwnershipAsync();
|
||||||
_ = Task.Run(ExecuteReadySubscriptions);
|
_ = Task.Run(ExecuteReadySubscriptions);
|
||||||
Log.Information("Shard {ShardId} ready", Client.ShardId);
|
Log.Information("Shard {ShardId} ready", Client.ShardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async ValueTask EnsureBotOwnershipAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_creds.OwnerIds.Count != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Log.Information("Initializing Owner Id...");
|
||||||
|
var info = await Client.GetApplicationInfoAsync();
|
||||||
|
_credsProvider.ModifyCredsFile(x => x.OwnerIds = new[] { info.Owner.Id });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Warning("Getting application info failed: {ErrorMessage}", ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Task ExecuteReadySubscriptions()
|
private Task ExecuteReadySubscriptions()
|
||||||
{
|
{
|
||||||
var readyExecutors = Services.GetServices<IReadyExecutor>();
|
var readyExecutors = Services.GetServices<IReadyExecutor>();
|
||||||
|
@@ -12,7 +12,7 @@ namespace NadekoBot.Common.Configs;
|
|||||||
public sealed partial class BotConfig : ICloneable<BotConfig>
|
public sealed partial class BotConfig : ICloneable<BotConfig>
|
||||||
{
|
{
|
||||||
[Comment(@"DO NOT CHANGE")]
|
[Comment(@"DO NOT CHANGE")]
|
||||||
public int Version { get; set; } = 4;
|
public int Version { get; set; } = 5;
|
||||||
|
|
||||||
[Comment(@"Most commands, when executed, have a small colored line
|
[Comment(@"Most commands, when executed, have a small colored line
|
||||||
next to the response. The color depends whether the command
|
next to the response. The color depends whether the command
|
||||||
@@ -40,6 +40,10 @@ Allowed values: Simple, Normal, None")]
|
|||||||
or all owners? (this might cause the bot to lag if there's a lot of owners specified)")]
|
or all owners? (this might cause the bot to lag if there's a lot of owners specified)")]
|
||||||
public bool ForwardToAllOwners { get; set; }
|
public bool ForwardToAllOwners { get; set; }
|
||||||
|
|
||||||
|
[Comment(@"Any messages sent by users in Bot's DM to be forwarded to the specified channel.
|
||||||
|
This option will only work when ForwardToAllOwners is set to false")]
|
||||||
|
public ulong? ForwardToChannel { get; set; }
|
||||||
|
|
||||||
[Comment(@"When a user DMs the bot with a message which is not a command
|
[Comment(@"When a user DMs the bot with a message which is not a command
|
||||||
they will receive this message. Leave empty for no response. The string which will be sent whenever someone DMs the bot.
|
they will receive this message. Leave empty for no response. The string which will be sent whenever someone DMs the bot.
|
||||||
Supports embeds. How it looks: https://puu.sh/B0BLV.png")]
|
Supports embeds. How it looks: https://puu.sh/B0BLV.png")]
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
namespace NadekoBot;
|
||||||
|
|
||||||
|
public interface INadekoInteractionService
|
||||||
|
{
|
||||||
|
public NadekoInteraction Create<T>(
|
||||||
|
ulong userId,
|
||||||
|
SimpleInteraction<T> inter);
|
||||||
|
}
|
@@ -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);
|
|
||||||
}
|
|
@@ -1,25 +1,30 @@
|
|||||||
namespace NadekoBot;
|
namespace NadekoBot;
|
||||||
|
|
||||||
public abstract class NadekoButtonInteraction
|
public sealed class NadekoInteraction
|
||||||
{
|
{
|
||||||
// improvements:
|
private readonly ulong _authorId;
|
||||||
// - state in OnAction
|
private readonly ButtonBuilder _button;
|
||||||
// - configurable delay
|
private readonly Func<SocketMessageComponent, Task> _onClick;
|
||||||
// -
|
private readonly bool _onlyAuthor;
|
||||||
protected abstract string Name { get; }
|
|
||||||
protected abstract IEmote Emote { get; }
|
|
||||||
protected virtual string? Text { get; } = null;
|
|
||||||
|
|
||||||
public DiscordSocketClient Client { get; }
|
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);
|
_interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
|
||||||
|
Client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RunAsync(IUserMessage msg)
|
public async Task RunAsync(IUserMessage msg)
|
||||||
@@ -27,29 +32,25 @@ public abstract class NadekoButtonInteraction
|
|||||||
message = msg;
|
message = msg;
|
||||||
|
|
||||||
Client.InteractionCreated += OnInteraction;
|
Client.InteractionCreated += OnInteraction;
|
||||||
await Task.WhenAny(Task.Delay(10_000), _interactionCompletedSource.Task);
|
await Task.WhenAny(Task.Delay(15_000), _interactionCompletedSource.Task);
|
||||||
Client.InteractionCreated -= OnInteraction;
|
Client.InteractionCreated -= OnInteraction;
|
||||||
|
|
||||||
await msg.ModifyAsync(m => m.Components = new ComponentBuilder().Build());
|
await msg.ModifyAsync(m => m.Components = new ComponentBuilder().Build());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract ValueTask<bool> Validate(SocketMessageComponent smc);
|
private Task OnInteraction(SocketInteraction arg)
|
||||||
private async Task OnInteraction(SocketInteraction arg)
|
|
||||||
{
|
{
|
||||||
if (arg is not SocketMessageComponent smc)
|
if (arg is not SocketMessageComponent smc)
|
||||||
return;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
if (smc.Message.Id != message.Id)
|
if (smc.Message.Id != message.Id)
|
||||||
return;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
if (smc.Data.CustomId != Name)
|
if (_onlyAuthor && smc.User.Id != _authorId)
|
||||||
return;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
if (!await Validate(smc))
|
if (smc.Data.CustomId != _button.CustomId)
|
||||||
{
|
return Task.CompletedTask;
|
||||||
await smc.DeferAsync();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_ = Task.Run(async () =>
|
_ = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
@@ -63,21 +64,19 @@ public abstract class NadekoButtonInteraction
|
|||||||
await smc.DeferAsync();
|
await smc.DeferAsync();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual MessageComponent CreateComponent()
|
public MessageComponent CreateComponent()
|
||||||
{
|
{
|
||||||
var comp = new ComponentBuilder()
|
var comp = new ComponentBuilder()
|
||||||
.WithButton(GetButtonBuilder());
|
.WithButton(_button);
|
||||||
|
|
||||||
return comp.Build();
|
return comp.Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ButtonBuilder GetButtonBuilder()
|
public Task ExecuteOnActionAsync(SocketMessageComponent smc)
|
||||||
=> new ButtonBuilder(style: ButtonStyle.Secondary, emote: Emote, customId: Name, label: Text);
|
=> _onClick(smc);
|
||||||
|
|
||||||
public abstract Task ExecuteOnActionAsync(SocketMessageComponent smc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is all so wrong ...
|
|
@@ -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();
|
|
||||||
// }
|
|
||||||
// }
|
|
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
20
src/NadekoBot/Common/Interaction/NadekoInteractionService.cs
Normal file
20
src/NadekoBot/Common/Interaction/NadekoInteractionService.cs
Normal 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);
|
||||||
|
}
|
@@ -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);
|
|
||||||
}
|
|
@@ -186,7 +186,6 @@ public sealed class MedusaLoaderService : IMedusaLoaderService, IReadyExecutor,
|
|||||||
return MedusaLoadResult.AlreadyLoaded;
|
return MedusaLoadResult.AlreadyLoaded;
|
||||||
|
|
||||||
var safeName = Uri.EscapeDataString(name);
|
var safeName = Uri.EscapeDataString(name);
|
||||||
name = name.ToLowerInvariant();
|
|
||||||
|
|
||||||
await _lock.WaitAsync();
|
await _lock.WaitAsync();
|
||||||
try
|
try
|
||||||
@@ -525,7 +524,6 @@ public sealed class MedusaLoaderService : IMedusaLoaderService, IReadyExecutor,
|
|||||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
private async Task<MedusaUnloadResult> InternalUnloadAsync(string name)
|
private async Task<MedusaUnloadResult> InternalUnloadAsync(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLowerInvariant();
|
|
||||||
if (!_resolved.Remove(name, out var lsi))
|
if (!_resolved.Remove(name, out var lsi))
|
||||||
return MedusaUnloadResult.NotLoaded;
|
return MedusaUnloadResult.NotLoaded;
|
||||||
|
|
||||||
|
@@ -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);
|
|
||||||
}
|
|
@@ -18,6 +18,7 @@ public abstract class NadekoModule : ModuleBase
|
|||||||
public CommandHandler _cmdHandler { get; set; }
|
public CommandHandler _cmdHandler { get; set; }
|
||||||
public ILocalization _localization { get; set; }
|
public ILocalization _localization { get; set; }
|
||||||
public IEmbedBuilderService _eb { get; set; }
|
public IEmbedBuilderService _eb { get; set; }
|
||||||
|
public INadekoInteractionService _inter { get; set; }
|
||||||
|
|
||||||
protected string prefix
|
protected string prefix
|
||||||
=> _cmdHandler.GetPrefix(ctx.Guild);
|
=> _cmdHandler.GetPrefix(ctx.Guild);
|
||||||
@@ -36,7 +37,7 @@ public abstract class NadekoModule : ModuleBase
|
|||||||
string error,
|
string error,
|
||||||
string url = null,
|
string url = null,
|
||||||
string footer = null,
|
string footer = null,
|
||||||
NadekoButtonInteraction inter = null)
|
NadekoInteraction inter = null)
|
||||||
=> ctx.Channel.SendErrorAsync(_eb, title, error, url, footer);
|
=> ctx.Channel.SendErrorAsync(_eb, title, error, url, footer);
|
||||||
|
|
||||||
public Task<IUserMessage> SendConfirmAsync(
|
public Task<IUserMessage> SendConfirmAsync(
|
||||||
@@ -47,32 +48,32 @@ public abstract class NadekoModule : ModuleBase
|
|||||||
=> ctx.Channel.SendConfirmAsync(_eb, title, text, url, footer);
|
=> 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);
|
=> 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);
|
=> 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);
|
=> ctx.Channel.SendAsync(_eb, text, MessageType.Pending, inter);
|
||||||
|
|
||||||
|
|
||||||
// localized normal
|
// localized normal
|
||||||
public Task<IUserMessage> ErrorLocalizedAsync(LocStr str, NadekoButtonInteraction inter = null)
|
public Task<IUserMessage> ErrorLocalizedAsync(LocStr str, NadekoInteraction inter = null)
|
||||||
=> SendErrorAsync(GetText(str), inter);
|
=> 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);
|
=> 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);
|
=> SendConfirmAsync(GetText(str), inter);
|
||||||
|
|
||||||
// localized replies
|
// 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);
|
=> 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);
|
=> 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);
|
=> SendConfirmAsync($"{Format.Bold(ctx.User.ToString())} {GetText(str)}", inter);
|
||||||
|
|
||||||
public async Task<bool> PromptUserConfirmAsync(IEmbedBuilder embed)
|
public async Task<bool> PromptUserConfirmAsync(IEmbedBuilder embed)
|
||||||
|
@@ -1,15 +1,14 @@
|
|||||||
#nullable disable
|
using CommandLine;
|
||||||
using CommandLine;
|
|
||||||
|
|
||||||
namespace NadekoBot.Common;
|
namespace NadekoBot.Common;
|
||||||
|
|
||||||
public static class OptionsParser
|
public static class OptionsParser
|
||||||
{
|
{
|
||||||
public static T ParseFrom<T>(string[] args)
|
public static T ParseFrom<T>(string[]? args)
|
||||||
where T : INadekoCommandOptions, new()
|
where T : INadekoCommandOptions, new()
|
||||||
=> ParseFrom(new T(), args).Item1;
|
=> ParseFrom(new T(), args).Item1;
|
||||||
|
|
||||||
public static (T, bool) ParseFrom<T>(T options, string[] args)
|
public static (T, bool) ParseFrom<T>(T options, string[]? args)
|
||||||
where T : INadekoCommandOptions
|
where T : INadekoCommandOptions
|
||||||
{
|
{
|
||||||
using var p = new Parser(x =>
|
using var p = new Parser(x =>
|
||||||
|
33
src/NadekoBot/Common/TypeReaders/GuildUserTypeReader.cs
Normal file
33
src/NadekoBot/Common/TypeReaders/GuildUserTypeReader.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
using LinqToDB.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using NadekoBot.Services.Database.Models;
|
using NadekoBot.Services.Database.Models;
|
||||||
|
|
||||||
@@ -6,12 +7,14 @@ namespace NadekoBot.Db;
|
|||||||
|
|
||||||
public static class CurrencyTransactionExtensions
|
public static class CurrencyTransactionExtensions
|
||||||
{
|
{
|
||||||
public static List<CurrencyTransaction> GetPageFor(this DbSet<CurrencyTransaction> set, ulong userId, int page)
|
public static Task<List<CurrencyTransaction>> GetPageFor(
|
||||||
=> set.AsQueryable()
|
this DbSet<CurrencyTransaction> set,
|
||||||
.AsNoTracking()
|
ulong userId,
|
||||||
|
int page)
|
||||||
|
=> set.ToLinqToDBTable()
|
||||||
.Where(x => x.UserId == userId)
|
.Where(x => x.UserId == userId)
|
||||||
.OrderByDescending(x => x.DateAdded)
|
.OrderByDescending(x => x.DateAdded)
|
||||||
.Skip(15 * page)
|
.Skip(15 * page)
|
||||||
.Take(15)
|
.Take(15)
|
||||||
.ToList();
|
.ToListAsyncLinqToDB();
|
||||||
}
|
}
|
@@ -49,7 +49,8 @@ public enum PunishmentAction
|
|||||||
ChatMute,
|
ChatMute,
|
||||||
VoiceMute,
|
VoiceMute,
|
||||||
AddRole,
|
AddRole,
|
||||||
Warn
|
Warn,
|
||||||
|
TimeOut
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AntiSpamIgnore : DbEntity
|
public class AntiSpamIgnore : DbEntity
|
||||||
|
9
src/NadekoBot/Db/Models/AutoPublishChannel.cs
Normal file
9
src/NadekoBot/Db/Models/AutoPublishChannel.cs
Normal 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; }
|
||||||
|
}
|
@@ -5,4 +5,5 @@ public class BanTemplate : DbEntity
|
|||||||
{
|
{
|
||||||
public ulong GuildId { get; set; }
|
public ulong GuildId { get; set; }
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
|
public int? PruneDays { get; set; }
|
||||||
}
|
}
|
@@ -17,8 +17,6 @@ public class DiscordUser : DbEntity
|
|||||||
public bool IsClubAdmin { get; set; }
|
public bool IsClubAdmin { get; set; }
|
||||||
|
|
||||||
public long TotalXp { 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 XpNotificationLocation NotifyOnLevelUp { get; set; }
|
||||||
|
|
||||||
public long CurrencyAmount { get; set; }
|
public long CurrencyAmount { get; set; }
|
||||||
|
9
src/NadekoBot/Db/Models/GamblingStats.cs
Normal file
9
src/NadekoBot/Db/Models/GamblingStats.cs
Normal 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; }
|
||||||
|
}
|
@@ -95,6 +95,8 @@ public class GuildConfig : DbEntity
|
|||||||
public int WarnExpireHours { get; set; }
|
public int WarnExpireHours { get; set; }
|
||||||
public WarnExpireAction WarnExpireAction { get; set; } = WarnExpireAction.Clear;
|
public WarnExpireAction WarnExpireAction { get; set; } = WarnExpireAction.Clear;
|
||||||
|
|
||||||
|
public bool DisableGlobalExpressions { get; set; } = false;
|
||||||
|
|
||||||
#region Boost Message
|
#region Boost Message
|
||||||
|
|
||||||
public bool SendBoostMessage { get; set; }
|
public bool SendBoostMessage { get; set; }
|
||||||
|
@@ -24,6 +24,7 @@ public class ShopEntry : DbEntity, IIndexed
|
|||||||
|
|
||||||
//list
|
//list
|
||||||
public HashSet<ShopEntryItem> Items { get; set; } = new();
|
public HashSet<ShopEntryItem> Items { get; set; } = new();
|
||||||
|
public ulong? RoleRequirement { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShopEntryItem : DbEntity
|
public class ShopEntryItem : DbEntity
|
||||||
|
@@ -8,7 +8,6 @@ public class UserXpStats : DbEntity
|
|||||||
public long Xp { get; set; }
|
public long Xp { get; set; }
|
||||||
public long AwardedXp { get; set; }
|
public long AwardedXp { get; set; }
|
||||||
public XpNotificationLocation NotifyOnLevelUp { get; set; }
|
public XpNotificationLocation NotifyOnLevelUp { get; set; }
|
||||||
public DateTime LastLevelUp { get; set; } = DateTime.UtcNow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum XpNotificationLocation { None, Dm, Channel }
|
public enum XpNotificationLocation { None, Dm, Channel }
|
@@ -13,6 +13,6 @@ public class XpShopOwnedItem : DbEntity
|
|||||||
|
|
||||||
public enum XpShopItemType
|
public enum XpShopItemType
|
||||||
{
|
{
|
||||||
Background,
|
Background = 0,
|
||||||
Frame,
|
Frame = 1,
|
||||||
}
|
}
|
@@ -10,10 +10,6 @@ public sealed class MysqlContext : NadekoContext
|
|||||||
|
|
||||||
protected override string CurrencyTransactionOtherIdDefaultValue
|
protected override string CurrencyTransactionOtherIdDefaultValue
|
||||||
=> "NULL";
|
=> "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")
|
public MysqlContext(string connStr = "Server=localhost", string version = "8.0")
|
||||||
{
|
{
|
||||||
|
@@ -65,8 +65,6 @@ public abstract class NadekoContext : DbContext
|
|||||||
#region Mandatory Provider-Specific Values
|
#region Mandatory Provider-Specific Values
|
||||||
|
|
||||||
protected abstract string CurrencyTransactionOtherIdDefaultValue { get; }
|
protected abstract string CurrencyTransactionOtherIdDefaultValue { get; }
|
||||||
protected abstract string DiscordUserLastXpGainDefaultValue { get; }
|
|
||||||
protected abstract string LastLevelUpDefaultValue { get; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -166,12 +164,6 @@ public abstract class NadekoContext : DbContext
|
|||||||
du.Property(x => x.NotifyOnLevelUp)
|
du.Property(x => x.NotifyOnLevelUp)
|
||||||
.HasDefaultValue(XpNotificationLocation.None);
|
.HasDefaultValue(XpNotificationLocation.None);
|
||||||
|
|
||||||
du.Property(x => x.LastXpGain)
|
|
||||||
.HasDefaultValueSql(DiscordUserLastXpGainDefaultValue);
|
|
||||||
|
|
||||||
du.Property(x => x.LastLevelUp)
|
|
||||||
.HasDefaultValueSql(LastLevelUpDefaultValue);
|
|
||||||
|
|
||||||
du.Property(x => x.TotalXp)
|
du.Property(x => x.TotalXp)
|
||||||
.HasDefaultValue(0);
|
.HasDefaultValue(0);
|
||||||
|
|
||||||
@@ -213,9 +205,6 @@ public abstract class NadekoContext : DbContext
|
|||||||
})
|
})
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
xps.Property(x => x.LastLevelUp)
|
|
||||||
.HasDefaultValueSql(LastLevelUpDefaultValue);
|
|
||||||
|
|
||||||
xps.HasIndex(x => x.UserId);
|
xps.HasIndex(x => x.UserId);
|
||||||
xps.HasIndex(x => x.GuildId);
|
xps.HasIndex(x => x.GuildId);
|
||||||
xps.HasIndex(x => x.Xp);
|
xps.HasIndex(x => x.Xp);
|
||||||
@@ -341,6 +330,10 @@ public abstract class NadekoContext : DbContext
|
|||||||
#region BanTemplate
|
#region BanTemplate
|
||||||
|
|
||||||
modelBuilder.Entity<BanTemplate>().HasIndex(x => x.GuildId).IsUnique();
|
modelBuilder.Entity<BanTemplate>().HasIndex(x => x.GuildId).IsUnique();
|
||||||
|
modelBuilder.Entity<BanTemplate>()
|
||||||
|
.Property(x => x.PruneDays)
|
||||||
|
.HasDefaultValue(null)
|
||||||
|
.IsRequired(false);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -471,6 +464,22 @@ public abstract class NadekoContext : DbContext
|
|||||||
});
|
});
|
||||||
|
|
||||||
#endregion
|
#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
|
#if DEBUG
|
||||||
|
@@ -8,10 +8,6 @@ public sealed class PostgreSqlContext : NadekoContext
|
|||||||
|
|
||||||
protected override string CurrencyTransactionOtherIdDefaultValue
|
protected override string CurrencyTransactionOtherIdDefaultValue
|
||||||
=> "NULL";
|
=> "NULL";
|
||||||
protected override string DiscordUserLastXpGainDefaultValue
|
|
||||||
=> "timezone('utc', now()) - interval '-1 year'";
|
|
||||||
protected override string LastLevelUpDefaultValue
|
|
||||||
=> "timezone('utc', now())";
|
|
||||||
|
|
||||||
public PostgreSqlContext(string connStr = "Host=localhost")
|
public PostgreSqlContext(string connStr = "Host=localhost")
|
||||||
{
|
{
|
||||||
|
@@ -9,10 +9,6 @@ public sealed class SqliteContext : NadekoContext
|
|||||||
|
|
||||||
protected override string CurrencyTransactionOtherIdDefaultValue
|
protected override string CurrencyTransactionOtherIdDefaultValue
|
||||||
=> "NULL";
|
=> "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)
|
public SqliteContext(string connectionString = "Data Source=data/NadekoBot.db", int commandTimeout = 60)
|
||||||
{
|
{
|
||||||
|
3542
src/NadekoBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs
generated
Normal file
3542
src/NadekoBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3546
src/NadekoBot/Migrations/Mysql/20220831142722_banprune.Designer.cs
generated
Normal file
3546
src/NadekoBot/Migrations/Mysql/20220831142722_banprune.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
25
src/NadekoBot/Migrations/Mysql/20220831142722_banprune.cs
Normal file
25
src/NadekoBot/Migrations/Mysql/20220831142722_banprune.cs
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3550
src/NadekoBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs
generated
Normal file
3550
src/NadekoBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3579
src/NadekoBot/Migrations/Mysql/20220916194514_autopub.Designer.cs
generated
Normal file
3579
src/NadekoBot/Migrations/Mysql/20220916194514_autopub.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
42
src/NadekoBot/Migrations/Mysql/20220916194514_autopub.cs
Normal file
42
src/NadekoBot/Migrations/Mysql/20220916194514_autopub.cs
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3612
src/NadekoBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs
generated
Normal file
3612
src/NadekoBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3616
src/NadekoBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs
generated
Normal file
3616
src/NadekoBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace NadekoBot.Migrations.Mysql
|
||||||
|
{
|
||||||
|
public partial class toggleglobalexpressions : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "disableglobalexpressions",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "disableglobalexpressions",
|
||||||
|
table: "guildconfigs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -19,6 +19,35 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasAnnotation("ProductVersion", "6.0.7")
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
.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 =>
|
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -168,18 +197,6 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("isclubadmin");
|
.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")
|
b.Property<int>("NotifyOnLevelUp")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
@@ -687,6 +704,10 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasColumnType("bigint unsigned")
|
.HasColumnType("bigint unsigned")
|
||||||
.HasColumnName("guildid");
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
|
b.Property<int?>("PruneDays")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("prunedays");
|
||||||
|
|
||||||
b.Property<string>("Text")
|
b.Property<string>("Text")
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasColumnName("text");
|
.HasColumnName("text");
|
||||||
@@ -1080,6 +1101,39 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
b.ToTable("filterwordschannelid", (string)null);
|
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 =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -1204,6 +1258,10 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasColumnType("tinyint(1)")
|
.HasColumnType("tinyint(1)")
|
||||||
.HasColumnName("deletestreamonlinemessage");
|
.HasColumnName("deletestreamonlinemessage");
|
||||||
|
|
||||||
|
b.Property<bool>("DisableGlobalExpressions")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("disableglobalexpressions");
|
||||||
|
|
||||||
b.Property<string>("DmGreetMessageText")
|
b.Property<string>("DmGreetMessageText")
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasColumnName("dmgreetmessagetext");
|
.HasColumnName("dmgreetmessagetext");
|
||||||
@@ -2244,6 +2302,10 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasColumnName("rolename");
|
.HasColumnName("rolename");
|
||||||
|
|
||||||
|
b.Property<ulong?>("RoleRequirement")
|
||||||
|
.HasColumnType("bigint unsigned")
|
||||||
|
.HasColumnName("rolerequirement");
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasColumnName("type");
|
.HasColumnName("type");
|
||||||
@@ -2565,12 +2627,6 @@ namespace NadekoBot.Migrations.Mysql
|
|||||||
.HasColumnType("bigint unsigned")
|
.HasColumnType("bigint unsigned")
|
||||||
.HasColumnName("guildid");
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
b.Property<DateTime>("LastLevelUp")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("datetime(6)")
|
|
||||||
.HasColumnName("lastlevelup")
|
|
||||||
.HasDefaultValueSql("(UTC_TIMESTAMP)");
|
|
||||||
|
|
||||||
b.Property<int>("NotifyOnLevelUp")
|
b.Property<int>("NotifyOnLevelUp")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasColumnName("notifyonlevelup");
|
.HasColumnName("notifyonlevelup");
|
3686
src/NadekoBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs
generated
Normal file
3686
src/NadekoBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3690
src/NadekoBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs
generated
Normal file
3690
src/NadekoBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3694
src/NadekoBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs
generated
Normal file
3694
src/NadekoBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3725
src/NadekoBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs
generated
Normal file
3725
src/NadekoBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3760
src/NadekoBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs
generated
Normal file
3760
src/NadekoBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3764
src/NadekoBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs
generated
Normal file
3764
src/NadekoBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace NadekoBot.Migrations.PostgreSql
|
||||||
|
{
|
||||||
|
public partial class toggleglobalexpressions : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "disableglobalexpressions",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "disableglobalexpressions",
|
||||||
|
table: "guildconfigs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -22,6 +22,37 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
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 =>
|
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -36,7 +67,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("balance");
|
.HasColumnName("balance");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("UserId")
|
b.Property<decimal>("UserId")
|
||||||
@@ -101,7 +132,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
@@ -163,7 +194,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("currencyamount");
|
.HasColumnName("currencyamount");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Discriminator")
|
b.Property<string>("Discriminator")
|
||||||
@@ -176,18 +207,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("isclubadmin");
|
.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")
|
b.Property<int>("NotifyOnLevelUp")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
@@ -243,7 +262,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -322,7 +341,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("amountcents");
|
.HasColumnName("amountcents");
|
||||||
|
|
||||||
b.Property<DateTime>("LastCharge")
|
b.Property<DateTime>("LastCharge")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("lastcharge");
|
.HasColumnName("lastcharge");
|
||||||
|
|
||||||
b.Property<string>("UniquePlatformUserId")
|
b.Property<string>("UniquePlatformUserId")
|
||||||
@@ -330,7 +349,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("uniqueplatformuserid");
|
.HasColumnName("uniqueplatformuserid");
|
||||||
|
|
||||||
b.Property<DateTime>("ValidThru")
|
b.Property<DateTime>("ValidThru")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("validthru");
|
.HasColumnName("validthru");
|
||||||
|
|
||||||
b.HasKey("UserId")
|
b.HasKey("UserId")
|
||||||
@@ -357,7 +376,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("MessageId")
|
b.Property<decimal>("MessageId")
|
||||||
@@ -388,7 +407,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("IsUsing")
|
b.Property<bool>("IsUsing")
|
||||||
@@ -471,7 +490,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("action");
|
.HasColumnName("action");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("GuildConfigId")
|
b.Property<int>("GuildConfigId")
|
||||||
@@ -518,7 +537,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.HasKey("Id")
|
b.HasKey("Id")
|
||||||
@@ -544,7 +563,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("action");
|
.HasColumnName("action");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("GuildConfigId")
|
b.Property<int>("GuildConfigId")
|
||||||
@@ -595,7 +614,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("commandtext");
|
.HasColumnName("commandtext");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal?>("GuildId")
|
b.Property<decimal?>("GuildId")
|
||||||
@@ -642,7 +661,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -676,7 +695,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Source")
|
b.Property<string>("Source")
|
||||||
@@ -710,13 +729,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
.HasColumnType("numeric(20,0)")
|
.HasColumnType("numeric(20,0)")
|
||||||
.HasColumnName("guildid");
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
|
b.Property<int?>("PruneDays")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("prunedays");
|
||||||
|
|
||||||
b.Property<string>("Text")
|
b.Property<string>("Text")
|
||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("text");
|
.HasColumnName("text");
|
||||||
@@ -741,7 +764,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("ItemId")
|
b.Property<decimal>("ItemId")
|
||||||
@@ -768,7 +791,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -806,7 +829,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("commandname");
|
.HasColumnName("commandname");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -840,7 +863,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("amount");
|
.HasColumnName("amount");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Extra")
|
b.Property<string>("Extra")
|
||||||
@@ -890,7 +913,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -924,7 +947,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("command");
|
.HasColumnName("command");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal?>("GuildId")
|
b.Property<decimal?>("GuildId")
|
||||||
@@ -955,7 +978,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("ItemId")
|
b.Property<decimal>("ItemId")
|
||||||
@@ -993,7 +1016,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("GuildConfigId")
|
b.Property<int>("GuildConfigId")
|
||||||
@@ -1028,7 +1051,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1054,7 +1077,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1088,7 +1111,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1118,7 +1141,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1134,6 +1157,41 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
b.ToTable("filterwordschannelid", (string)null);
|
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 =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -1148,7 +1206,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1174,7 +1232,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("GuildConfigId")
|
b.Property<int>("GuildConfigId")
|
||||||
@@ -1253,7 +1311,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("cleverbotenabled");
|
.HasColumnName("cleverbotenabled");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("DeleteMessageOnCommand")
|
b.Property<bool>("DeleteMessageOnCommand")
|
||||||
@@ -1264,6 +1322,10 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("deletestreamonlinemessage");
|
.HasColumnName("deletestreamonlinemessage");
|
||||||
|
|
||||||
|
b.Property<bool>("DisableGlobalExpressions")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("disableglobalexpressions");
|
||||||
|
|
||||||
b.Property<string>("DmGreetMessageText")
|
b.Property<string>("DmGreetMessageText")
|
||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("dmgreetmessagetext");
|
.HasColumnName("dmgreetmessagetext");
|
||||||
@@ -1381,7 +1443,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("ItemType")
|
b.Property<int>("ItemType")
|
||||||
@@ -1420,7 +1482,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("LogSettingId")
|
b.Property<int?>("LogSettingId")
|
||||||
@@ -1450,7 +1512,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -1493,7 +1555,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelupdatedid");
|
.HasColumnName("channelupdatedid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -1629,7 +1691,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("authorid");
|
.HasColumnName("authorid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
@@ -1652,7 +1714,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1694,7 +1756,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("containsanywhere");
|
.HasColumnName("containsanywhere");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("DmResponse")
|
b.Property<bool>("DmResponse")
|
||||||
@@ -1733,7 +1795,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -1763,7 +1825,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -1825,7 +1887,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -1867,7 +1929,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("MusicPlaylistId")
|
b.Property<int?>("MusicPlaylistId")
|
||||||
@@ -1917,7 +1979,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -1948,7 +2010,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("Index")
|
b.Property<int>("Index")
|
||||||
@@ -1982,7 +2044,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("PollId")
|
b.Property<int?>("PollId")
|
||||||
@@ -2025,7 +2087,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("authorname");
|
.HasColumnName("authorname");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -2068,7 +2130,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Emote")
|
b.Property<string>("Emote")
|
||||||
@@ -2123,7 +2185,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("IsPrivate")
|
b.Property<bool>("IsPrivate")
|
||||||
@@ -2143,7 +2205,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("userid");
|
.HasColumnName("userid");
|
||||||
|
|
||||||
b.Property<DateTime>("When")
|
b.Property<DateTime>("When")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("when");
|
.HasColumnName("when");
|
||||||
|
|
||||||
b.HasKey("Id")
|
b.HasKey("Id")
|
||||||
@@ -2169,7 +2231,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("channelid");
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded")
|
b.Property<DateTime>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
@@ -2216,11 +2278,11 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("amountrewardedthismonth");
|
.HasColumnName("amountrewardedthismonth");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<DateTime>("LastReward")
|
b.Property<DateTime>("LastReward")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("lastreward");
|
.HasColumnName("lastreward");
|
||||||
|
|
||||||
b.Property<string>("PlatformUserId")
|
b.Property<string>("PlatformUserId")
|
||||||
@@ -2251,7 +2313,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("Status")
|
b.Property<string>("Status")
|
||||||
@@ -2278,7 +2340,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("Group")
|
b.Property<int>("Group")
|
||||||
@@ -2323,7 +2385,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("authorid");
|
.HasColumnName("authorid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2350,6 +2412,10 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("rolename");
|
.HasColumnName("rolename");
|
||||||
|
|
||||||
|
b.Property<decimal?>("RoleRequirement")
|
||||||
|
.HasColumnType("numeric(20,0)")
|
||||||
|
.HasColumnName("rolerequirement");
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("type");
|
.HasColumnName("type");
|
||||||
@@ -2373,7 +2439,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("ShopEntryId")
|
b.Property<int?>("ShopEntryId")
|
||||||
@@ -2403,7 +2469,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2433,7 +2499,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2463,7 +2529,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("StreamRoleSettingsId")
|
b.Property<int?>("StreamRoleSettingsId")
|
||||||
@@ -2501,7 +2567,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("addroleid");
|
.HasColumnName("addroleid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
@@ -2540,7 +2606,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("StreamRoleSettingsId")
|
b.Property<int?>("StreamRoleSettingsId")
|
||||||
@@ -2574,7 +2640,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2582,7 +2648,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("guildconfigid");
|
.HasColumnName("guildconfigid");
|
||||||
|
|
||||||
b.Property<DateTime>("UnbanAt")
|
b.Property<DateTime>("UnbanAt")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("unbanat");
|
.HasColumnName("unbanat");
|
||||||
|
|
||||||
b.Property<decimal>("UserId")
|
b.Property<decimal>("UserId")
|
||||||
@@ -2608,7 +2674,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2616,7 +2682,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("guildconfigid");
|
.HasColumnName("guildconfigid");
|
||||||
|
|
||||||
b.Property<DateTime>("UnmuteAt")
|
b.Property<DateTime>("UnmuteAt")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("unmuteat");
|
.HasColumnName("unmuteat");
|
||||||
|
|
||||||
b.Property<decimal>("UserId")
|
b.Property<decimal>("UserId")
|
||||||
@@ -2642,7 +2708,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2654,7 +2720,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("roleid");
|
.HasColumnName("roleid");
|
||||||
|
|
||||||
b.Property<DateTime>("UnbanAt")
|
b.Property<DateTime>("UnbanAt")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("unbanat");
|
.HasColumnName("unbanat");
|
||||||
|
|
||||||
b.Property<decimal>("UserId")
|
b.Property<decimal>("UserId")
|
||||||
@@ -2684,19 +2750,13 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("awardedxp");
|
.HasColumnName("awardedxp");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
.HasColumnType("numeric(20,0)")
|
.HasColumnType("numeric(20,0)")
|
||||||
.HasColumnName("guildid");
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
b.Property<DateTime>("LastLevelUp")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("timestamp with time zone")
|
|
||||||
.HasColumnName("lastlevelup")
|
|
||||||
.HasDefaultValueSql("timezone('utc', now())");
|
|
||||||
|
|
||||||
b.Property<int>("NotifyOnLevelUp")
|
b.Property<int>("NotifyOnLevelUp")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("notifyonlevelup");
|
.HasColumnName("notifyonlevelup");
|
||||||
@@ -2741,7 +2801,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -2783,7 +2843,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("claimerid");
|
.HasColumnName("claimerid");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<long>("Price")
|
b.Property<long>("Price")
|
||||||
@@ -2823,7 +2883,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<string>("ItemEmoji")
|
b.Property<string>("ItemEmoji")
|
||||||
@@ -2857,7 +2917,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("NewId")
|
b.Property<int?>("NewId")
|
||||||
@@ -2901,7 +2961,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<bool>("Forgiven")
|
b.Property<bool>("Forgiven")
|
||||||
@@ -2963,7 +3023,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("count");
|
.HasColumnName("count");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int?>("GuildConfigId")
|
b.Property<int?>("GuildConfigId")
|
||||||
@@ -3005,7 +3065,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
.HasColumnName("amount");
|
.HasColumnName("amount");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("Level")
|
b.Property<int>("Level")
|
||||||
@@ -3035,7 +3095,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("Level")
|
b.Property<int>("Level")
|
||||||
@@ -3074,7 +3134,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("DateAdded")
|
b.Property<DateTime?>("DateAdded")
|
||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp without time zone")
|
||||||
.HasColumnName("dateadded");
|
.HasColumnName("dateadded");
|
||||||
|
|
||||||
b.Property<int>("GuildConfigId")
|
b.Property<int>("GuildConfigId")
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user