Compare commits
218 commits
Author | SHA1 | Date | |
---|---|---|---|
8176cdbf96 | |||
113dc3748a | |||
5c72c6562f | |||
dd939ce55a | |||
1a52085340 | |||
487c7865cb | |||
3ba1d06fd0 | |||
4338df0b38 | |||
a321cdbe55 | |||
391d2e43e8 | |||
de97213046 | |||
b506b4461b | |||
a62a26091f | |||
c0cd161c90 | |||
564ae52291 | |||
72a556c7cf | |||
4afa604a1b | |||
4659da224b | |||
3be1105ea5 | |||
3195377e25 | |||
8ec4e6cbb0 | |||
6b44f9f5b7 | |||
4b5bfed33a | |||
aee8d32f61 | |||
a0bd130a5f | |||
a6939b2220 | |||
c4ba5e5593 | |||
3c1b994ab5 | |||
a079333d8c | |||
69f7e0bcba | |||
086b7fd9d7 | |||
fdd13aa087 | |||
eb9ed57547 | |||
eb17820a50 | |||
ff653b5c57 | |||
03ab232251 | |||
5505052af4 | |||
d9b644d50e | |||
f18808fb1c | |||
6b1d961642 | |||
6b5334025f | |||
7049a3fee9 | |||
b12102f735 | |||
9c94a66323 | |||
e896c14303 | |||
0d6b4da1ce | |||
47b146a501 | |||
3f21f300e0 | |||
fc8e97e13a | |||
1ea0e63379 | |||
6d0eac2d6f | |||
cb705ade41 | |||
5b451cee74 | |||
3e35c6ffc7 | |||
81a6171526 | |||
892eed4196 | |||
52b15131b9 | |||
2902921026 | |||
40b4ebf0fa | |||
78366ab7e4 | |||
140a35b82a | |||
f15d1d2495 | |||
2d0d2ff877 | |||
31ed61075e | |||
d58f1393ec | |||
b04768633c | |||
742d98a4c1 | |||
89ab9a2ceb | |||
b017c5e805 | |||
f70ff5c053 | |||
22d03005a1 | |||
38b26c0550 | |||
b752633e83 | |||
45d9fa08db | |||
74767e8661 | |||
1c53371598 | |||
7874008da2 | |||
7f935a72c1 | |||
ec403bbe5d | |||
37438f33a2 | |||
c6b9dd594d | |||
d478a6ca72 | |||
e324d49cbc | |||
f6d1cf076c | |||
851093197c | |||
94bc5c4928 | |||
290249dd06 | |||
85e8c48f90 | |||
3a25433ec8 | |||
2e541eebac | |||
b78f9dfd8c | |||
afd5be89d1 | |||
3ca832090e | |||
2605351f5c | |||
05c03248c4 | |||
51bfe8d206 | |||
da48250ad4 | |||
ba993a1bab | |||
58e59a208f | |||
1c9c8af2c5 | |||
3e9d3d9655 | |||
79bc4e75ca | |||
a39204b4a9 | |||
97f9a4e609 | |||
6128703bcc | |||
cd92577095 | |||
53b7ba640d | |||
1256562ad9 | |||
f10c49ec61 | |||
56d1c79205 | |||
28ff1851d5 | |||
fa9c27cd2f | |||
0b6e15dad4 | |||
2710f2b522 | |||
b491f8d828 | |||
3244bad7da | |||
09a4a69521 | |||
e26e2a7404 | |||
c61f3f1433 | |||
6e0a129bc0 | |||
7a82f262f8 | |||
a8aa1d909f | |||
027690b3d7 | |||
9892de7c2e | |||
811c126174 | |||
a6c2ec0511 | |||
7399e8bac1 | |||
fe7445eefb | |||
d428fc5532 | |||
66560bb769 | |||
7d0ef44e8e | |||
20a5d25eca | |||
82f82d0fb6 | |||
3f7e5d5054 | |||
523205aef5 | |||
500cb95208 | |||
a2381ff902 | |||
7dc3908147 | |||
9f46eaf5a7 | |||
430052a446 | |||
0397ea09b0 | |||
67224663cd | |||
3e73dc8ba5 | |||
fe5c8622dd | |||
219c122f1c | |||
2764bb390b | |||
efa71c0233 | |||
4c436ccd8f | |||
1df8f092fe | |||
e3a4c4bd43 | |||
3a597a49ea | |||
586f5ba4b0 | |||
20e5bbac89 | |||
86b015115a | |||
13fa7bd17b | |||
ddbf8fd3de | |||
9094b4e144 | |||
e4cc5f4e80 | |||
a51df649e2 | |||
13be30e823 | |||
8316b03c8c | |||
2e8e4daa25 | |||
7d6a7f159b | |||
47c6f9ab03 | |||
afa00c8d4f | |||
d07066adec | |||
636ddac4d4 | |||
376f7df222 | |||
f18eb1bf42 | |||
db83e6abc2 | |||
5c44755c64 | |||
8367179406 | |||
81b8b6fa1d | |||
8ac523a8ce | |||
668d9e4734 | |||
151146378b | |||
7e66063990 | |||
e49dfda0db | |||
f318ec2741 | |||
81ebad702b | |||
624171c35f | |||
b2b8e4c3d3 | |||
6b6f822ec8 | |||
ca64765c34 | |||
90dd47e013 | |||
32db627aef | |||
c3340a16ba | |||
e521c82d96 | |||
8cc70e7edf | |||
06802f42a3 | |||
347297fb12 | |||
187c56e8c7 | |||
e100526d80 | |||
94129fb3e2 | |||
2be2cdf713 | |||
291b2fb580 | |||
2ebed3f441 | |||
f2618793b3 | |||
0787490aea | |||
f91771a8db | |||
499c2a9a5f | |||
2d7f345c40 | |||
3a36799941 | |||
30f859b9a0 | |||
56d82a5a26 | |||
d58c516649 | |||
62319ebb1a | |||
d31cf1bfae | |||
c5cd772126 | |||
5e7c75a498 | |||
151c3d5a6a | |||
c377ee2df7 | |||
3e3ccfb498 | |||
831f21580f | |||
c5c307b440 | |||
6b0d784454 | |||
a2890195a9 | |||
a6e891fc92 |
377 changed files with 22870 additions and 80133 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -20,6 +20,8 @@ src/EllieBot/credentials.json
|
||||||
src/EllieBot/old_credentials.json
|
src/EllieBot/old_credentials.json
|
||||||
src/EllieBot/credentials.json.bak
|
src/EllieBot/credentials.json.bak
|
||||||
src/EllieBot/data/EllieBot.db
|
src/EllieBot/data/EllieBot.db
|
||||||
|
ellie-menu.ps1
|
||||||
|
package.sh
|
||||||
|
|
||||||
# Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos
|
# Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos
|
||||||
|
|
||||||
|
|
236
CHANGELOG.md
236
CHANGELOG.md
|
@ -1,16 +1,236 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
|
||||||
|
|
||||||
|
## [5.1.14] - 03.10.2024
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Improved `.xplb -c`, it will now correctly only show users who are still in the server with no count limit
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fixed marmalade load error on startup
|
||||||
|
|
||||||
|
## [5.1.13] - 03.10.2024
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Grpc api server will no longer start unless enabled in creds
|
||||||
|
- Seq comment in creds fixed
|
||||||
|
|
||||||
|
## [5.1.12] - 03.10.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added support for `seq` for logging. If you fill in seq url and apiKey in creds.yml, bot will sends logs to it
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed the Check for updates service not using the right URL and spitting an error in the console.
|
||||||
|
- Fixed another bug in `.greet` / `.bye` system, which caused it to show wrong message on a wrong server occasionally
|
||||||
|
|
||||||
|
## [5.1.11] - 03.10.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `%user.displayname%` placeholder. It will show users nickname, if there is one, otherwise it will show the username.
|
||||||
|
- Nickname won't be shown in bye messages.
|
||||||
|
- Added initial version of grpc api. Beta
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed a bug which caused `.bye` and `.greet` messages to be randomly disabled
|
||||||
|
- Fixed `.lb -c` breaking sometimes, and fixed pagination
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Youtube now always uses `yt-dlp`. Dropped support for `youtube-dl`
|
||||||
|
- If you've previously renamed your yt-dlp file to youtube-dl, please rename it back.
|
||||||
|
- ytProvider in data/searches.yml now also controls where you're getting your song streams from.
|
||||||
|
- (Invidious support added for .q)
|
||||||
|
|
||||||
|
## [5.1.10] - 24.09.2024
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed claimed waifu decay in `games.yml`
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Added some logs for greet service in case there are unforeseen issues, for easier debugging
|
||||||
|
|
||||||
|
## [5.1.9] - 21.09.2024
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.greettest`, and other `.*test` commands if you didn't have them enabled.
|
||||||
|
- Fixed `.greetdmtest` sending messages twice.
|
||||||
|
- Fixed a serious bug which caused greet messages to be jumbled up, and wrong ones to be sent for the wrong events.
|
||||||
|
- There is no database issue, all greet messages are safe, the cache was caching any setting every 3 seconds with no regard for the type of the event
|
||||||
|
- This also caused `.greetdm` messages to not be sent if `.greet` is enabled
|
||||||
|
- This bug was introduced in 5.1.8. PLEASE UPDATE if you are on 5.1.8
|
||||||
|
- Selfhosters only: Fixed marmalade dependency loading
|
||||||
|
- Note: Make sure to not publish any other DLLs besides the ones you are sure you will need, as there can be version conflicts which didn't happen before.
|
||||||
|
|
||||||
|
## [5.1.8] - 20.09.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `.leaveunkeptservers` which will make the bot leave all servers on all shards whose owners didn't run `.keep` command.
|
||||||
|
- This is a dangerous and irreversible command, don't use it. Meant for use on the public bot.
|
||||||
|
- `.adpl` now supports custom statuses (you no longer need to specify Playing, Watching, etc...)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- `.quote` commands cleaned up and improved
|
||||||
|
- All quote commands now start with `.q<whatever>` and follow the same naming pattern as Expression commands
|
||||||
|
- `.liqu` renamed to `.qli`
|
||||||
|
- `.quotesearch` / `.qse` is now paginated for easier searching
|
||||||
|
- `.whosplaying` is now paginated
|
||||||
|
- `.img` is now paginated
|
||||||
|
- `.setgame` renamed to`.setactivity` and now supports custom text activity. You don't have to specify playing, listening etc before the activity
|
||||||
|
- Clarified and added some embed / placeholder links to command help where needed
|
||||||
|
- dev: A lot of code cleanup and internal improvements
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.xpcurrew` breaking xp gain if user gains 0 xp from being in a voice channel
|
||||||
|
- Fixed a bug in `.gatari` command
|
||||||
|
- Fixed some waifu related strings
|
||||||
|
- Fixed `.quoteshow` and `.quoteid` commands
|
||||||
|
- Fixed some placeholders not working in `.greetdm`
|
||||||
|
- Fixed postgres support
|
||||||
|
- Fixed and clarified some command strings/parameter descriptions
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Removed mysql support as it didn't work for a while, and requires some special handling/maintenance
|
||||||
|
- Sqlite and Postgres support stays
|
||||||
|
|
||||||
|
## [5.1.7] - 09.08.2024
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed some command groups incorrectly showing up as modules
|
||||||
|
|
||||||
|
## [5.1.6] - 08.08.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `.serverlist` is now paginated
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- `.listservers` renamed to `.serverlist`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- `.afk` messages can no longer ping, and the response is moved to DMs to avoid abuse
|
||||||
|
- Possible fix for `.remind` timestamp
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Removed old bloat / semi broken / dumb commands
|
||||||
|
- `.memelist` / `.memegen` (too inconvenient to use)
|
||||||
|
- `.activity` (useless owner-only command)
|
||||||
|
- `.rafflecur` (Just use raffle and then award manually instead)
|
||||||
|
- `.rollduel` (we had this command?)
|
||||||
|
- You can no longer bet on `.connect4`
|
||||||
|
- `.economy` Removed.
|
||||||
|
- Was buggy and didn.t really show the real state of the economy.
|
||||||
|
- It might come back improved in the future
|
||||||
|
- `.mal` Removed. Useless information / semi broken
|
||||||
|
|
||||||
|
## [5.1.5] - 01.08.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added: Added a `.afk <msg>?` command which sets an afk message which will trigger whenever someone pings you
|
||||||
|
- Message will when you type a message in any channel that the bot sees, or after 8 hours, whichever comes first
|
||||||
|
- The specified message will be prefixed with "The user is afk: "
|
||||||
|
- The afk message will disappear 30 seconds after being triggered
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bot now shows a message when .prune fails due to already running error
|
||||||
|
- Updated some bet descriptions to include 'all' 'half' usage instructions
|
||||||
|
- Updated some command strings
|
||||||
|
- dev: Vastly simplified marmalade creation using dotnet templates, docs updated
|
||||||
|
- Slight refactor of .wiki, .time, .catfact, .wikia, .define, .bible and .quran commands, no significant change in functionality
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- .coins will no longer show double minus sign for negative changes
|
||||||
|
- You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Removed .rip command
|
||||||
|
|
||||||
|
## [5.1.4] - 15.07.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `.coins` command which lists top 10 cryptos ordered by marketcap
|
||||||
|
- Added Clubs rank in the leaderboard to `.clubinfo`
|
||||||
|
- Bot owners can now check other people's bank balance (Not server owners, only bot owner, the person who is hosting the bot)
|
||||||
|
- You can now send multiple waifu gifts at once to waifus. For example `.waifugift 3xRose @user` will give that user 3 roses
|
||||||
|
- The format is `<NUMBER>x<ITEM>`, no spaces
|
||||||
|
- Added `.boosttest` command
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated command strings to clarify `.say` and `.send` usages
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.waifugift` help string
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Removed selfhost button from `.donate` command, no idea why it was there in the first place
|
||||||
|
|
||||||
|
## [5.1.3] - 08.07.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `.quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Replying to the bot's message in the channel where chatterbot is enabled will also trigger the ai response, as if you pinged the bot. This only works for chatterbot, but not for ellie ai command prompts
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.stickeradd` it now properly supports 300x300 image uploads.
|
||||||
|
- Bot should now trim the invalid characters from chatterbot usernames to avoid openai errors
|
||||||
|
- Fixed prompt triggering chatterbot responses twice
|
||||||
|
- Honeypot commands now actually works
|
||||||
|
|
||||||
|
## [5.1.2] - 29.06.2024
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Compile issues by disabling honeypot submodule for the time being
|
||||||
|
|
||||||
|
## [5.1.1] - 29.06.2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `.honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel.
|
||||||
|
- Useful to auto softban bots who spam every channel upon joining
|
||||||
|
- Users who run commands or expressions won't be softbanned.
|
||||||
|
- Users who have ban member permissions are also excluded.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `.betdraw` not respecting maxbet
|
||||||
|
- Fixed `.xpshop` pagination for real this time?
|
||||||
|
|
||||||
## [5.1.0] - 28.06.2024
|
## [5.1.0] - 28.06.2024
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Added `'prompt` command, Ellie Ai Assistant
|
|
||||||
- You can send natural language questions, queries or execute commands. For example "@Ellie how's the weather in paris" and it will return `'we Paris` and run it for you.
|
|
||||||
- In case the bot can't execute a command using your query, It will fall back to your chatter bot, in case you have it enabled in data/games.yml. (Cleverbot or chatgpt)
|
|
||||||
- (It's far from perfect so please don't ask the bot to do dangerous things like banning or pruning)
|
|
||||||
- Requires Patreon subscription, after which you'll be able to run it on global @Ellie bot. If you're selfhosting, you also will need to acquire the api key from <https://dashy.elliebot.net/api> (coming soon(ish)...)
|
|
||||||
- Added support for `gpt-4o` in `data/games.yml`
|
- Added support for `gpt-4o` in `data/games.yml`
|
||||||
- Added EllieAiToken to `creds.yml`
|
- Added EllieAiToken to `creds.yml`
|
||||||
|
|
||||||
|
@ -20,7 +240,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da
|
||||||
- Remind will now show a timestamp tag for durations
|
- Remind will now show a timestamp tag for durations
|
||||||
- Only `Gpt35Turbo` and `Gpt4o` are valid inputs in games.yml now
|
- Only `Gpt35Turbo` and `Gpt4o` are valid inputs in games.yml now
|
||||||
- `data/patron.yml` changed. It now has limits. The entire feature limit system has been reworked. Your previous settings will be reset
|
- `data/patron.yml` changed. It now has limits. The entire feature limit system has been reworked. Your previous settings will be reset
|
||||||
- A lot of updates to bot strings (thanks Ene)
|
- A lot of updates to bot strings
|
||||||
- Improved cleanup command to delete a lot more data once cleanup is ran, not only guild configs (please don't use this command unless you have your database bakced up and you know 100% what you're doing)
|
- Improved cleanup command to delete a lot more data once cleanup is ran, not only guild configs (please don't use this command unless you have your database bakced up and you know 100% what you're doing)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -29,7 +249,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da
|
||||||
- Fixed shopbuy %user% placeholders and updated help text
|
- Fixed shopbuy %user% placeholders and updated help text
|
||||||
- All 'feed overloads should now work"
|
- All 'feed overloads should now work"
|
||||||
- `'xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads.
|
- `'xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads.
|
||||||
- Fixed remind not showing correct time (thx cata)
|
- Fixed remind not showing correct time
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
23
Dockerfile
23
Dockerfile
|
@ -1,16 +1,24 @@
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
# Use the .NET 8.0 SDK as the base image for the build stage
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
WORKDIR /source
|
WORKDIR /source
|
||||||
|
|
||||||
|
# Copy the .csproj files for each project
|
||||||
COPY src/Ellie.Marmalade/*.csproj src/Ellie.Marmalade/
|
COPY src/Ellie.Marmalade/*.csproj src/Ellie.Marmalade/
|
||||||
COPY src/EllieBot/*.csproj src/EllieBot/
|
COPY src/EllieBot/*.csproj src/EllieBot/
|
||||||
COPY src/EllieBot.Coordinator/*.csproj src/EllieBot.Coordinator/
|
COPY src/EllieBot.Coordinator/*.csproj src/EllieBot.Coordinator/
|
||||||
COPY src/EllieBot.Generators/*.csproj src/EllieBot.Generators/
|
COPY src/EllieBot.Generators/*.csproj src/EllieBot.Generators/
|
||||||
COPY src/EllieBot.Voice/*.csproj src/EllieBot.Voice/
|
COPY src/EllieBot.Voice/*.csproj src/EllieBot.Voice/
|
||||||
COPY NuGet.Config ./
|
|
||||||
|
# Restore the dependencies for the EllieBot project
|
||||||
RUN dotnet restore src/EllieBot/
|
RUN dotnet restore src/EllieBot/
|
||||||
|
|
||||||
|
# Copy the rest of the source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Set the working directory to the EllieBot project
|
||||||
WORKDIR /source/src/EllieBot
|
WORKDIR /source/src/EllieBot
|
||||||
|
|
||||||
|
# Build and publish the EllieBot project, then clean up unnecessary files
|
||||||
RUN set -xe; \
|
RUN set -xe; \
|
||||||
dotnet --version; \
|
dotnet --version; \
|
||||||
dotnet publish -c Release -o /app --no-restore; \
|
dotnet publish -c Release -o /app --no-restore; \
|
||||||
|
@ -19,28 +27,33 @@ RUN set -xe; \
|
||||||
find /app -type f -exec chmod -x {} \; ;\
|
find /app -type f -exec chmod -x {} \; ;\
|
||||||
chmod +x /app/EllieBot
|
chmod +x /app/EllieBot
|
||||||
|
|
||||||
# final stage/image
|
# Use the .NET 8.0 runtime as the base image for the final stage
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:6.0
|
FROM mcr.microsoft.com/dotnet/runtime:8.0
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Create a new user, install dependencies, and set up sudoers file
|
||||||
RUN set -xe; \
|
RUN set -xe; \
|
||||||
useradd -m ellie; \
|
useradd -m ellie; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 sudo; \
|
apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 sudo; \
|
||||||
update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1; \
|
|
||||||
echo 'Defaults>ellie env_keep+="ASPNETCORE_* DOTNET_* EllieBot_* shard_id total_shards TZ"' > /etc/sudoers.d/ellie; \
|
echo 'Defaults>ellie env_keep+="ASPNETCORE_* DOTNET_* EllieBot_* shard_id total_shards TZ"' > /etc/sudoers.d/ellie; \
|
||||||
curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \
|
curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \
|
||||||
chmod a+rx /usr/local/bin/yt-dlp; \
|
chmod a+rx /usr/local/bin/yt-dlp; \
|
||||||
apt-get autoremove -y; \
|
apt-get autoremove -y; \
|
||||||
apt-get autoclean -y
|
apt-get autoclean -y
|
||||||
|
|
||||||
|
# Copy the built application and the entrypoint script from the build stage
|
||||||
COPY --from=build /app ./
|
COPY --from=build /app ./
|
||||||
COPY docker-entrypoint.sh /usr/local/sbin
|
COPY docker-entrypoint.sh /usr/local/sbin
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
ENV shard_id=0
|
ENV shard_id=0
|
||||||
ENV total_shards=1
|
ENV total_shards=1
|
||||||
ENV EllieBot__creds=/app/data/creds.yml
|
ENV EllieBot__creds=/app/data/creds.yml
|
||||||
|
|
||||||
|
# Define the data directory as a volume
|
||||||
VOLUME [" /app/data "]
|
VOLUME [" /app/data "]
|
||||||
|
|
||||||
|
# Set the entrypoint and default command
|
||||||
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
||||||
CMD dotnet EllieBot.dll "$shard_id" "$total_shards"
|
CMD dotnet EllieBot.dll "$shard_id" "$total_shards"
|
||||||
|
|
14
EllieBot.sln
14
EllieBot.sln
|
@ -8,13 +8,12 @@ EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C633450-E6C2-47ED-A7AA-7367232F703A}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C633450-E6C2-47ED-A7AA-7367232F703A}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
CHANGELOG.md = CHANGELOG.md
|
CHANGELOG.md = CHANGELOG.md
|
||||||
LICENSE = LICENSE
|
|
||||||
README.md = README.md
|
|
||||||
Dockerfile = Dockerfile
|
Dockerfile = Dockerfile
|
||||||
NuGet.Config = NuGet.Config
|
ellie-menu.ps1 = ellie-menu.ps1
|
||||||
|
LICENSE = LICENSE
|
||||||
migrate.ps1 = migrate.ps1
|
migrate.ps1 = migrate.ps1
|
||||||
|
README.md = README.md
|
||||||
remove-migrations.ps1 = remove-migrations.ps1
|
remove-migrations.ps1 = remove-migrations.ps1
|
||||||
TODO.md = TODO.md
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot", "src\EllieBot\EllieBot.csproj", "{4D9001F7-B3E8-48FE-97AA-CFD36DA65A64}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot", "src\EllieBot\EllieBot.csproj", "{4D9001F7-B3E8-48FE-97AA-CFD36DA65A64}"
|
||||||
|
@ -31,6 +30,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ellie.Marmalade", "src\Elli
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot.Voice", "src\EllieBot.Voice\EllieBot.Voice.csproj", "{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot.Voice", "src\EllieBot.Voice\EllieBot.Voice.csproj", "{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EllieBot.GrpcApiBase", "src\EllieBot.GrpcApiBase\EllieBot.GrpcApiBase.csproj", "{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -65,6 +66,10 @@ Global
|
||||||
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -77,6 +82,7 @@ Global
|
||||||
{F1A77F56-71B0-430E-AE46-94CDD7D43874} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
{F1A77F56-71B0-430E-AE46-94CDD7D43874} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
||||||
{76AC715D-12FF-4CBE-9585-A861139A2D0C} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
{76AC715D-12FF-4CBE-9585-A861139A2D0C} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
||||||
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
{1D93CE3C-80B4-49C7-A9A2-99988920AAEC} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
||||||
|
{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91} = {B28FB883-9688-41EB-BF5A-945F4A4EB628}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {79F61C2C-CDBB-4361-A234-91A0B334CFE4}
|
SolutionGuid = {79F61C2C-CDBB-4361-A234-91A0B334CFE4}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
|
||||||
<add key="toastielab.dev" value="https://toastielab.dev/api/packages/ellie/nuget/index.json" protocolVersion="3" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -5,5 +5,4 @@ else {
|
||||||
$migrationName = $args[0]
|
$migrationName = $args[0]
|
||||||
dotnet ef migrations add $migrationName -o Migrations/Mysql -c SqliteContext -p src/EllieBot/EllieBot.csproj
|
dotnet ef migrations add $migrationName -o Migrations/Mysql -c SqliteContext -p src/EllieBot/EllieBot.csproj
|
||||||
dotnet ef migrations add $migrationName -o Migrations/PostgreSql -c PostgreSqlContext -p src/EllieBot/EllieBot.csproj
|
dotnet ef migrations add $migrationName -o Migrations/PostgreSql -c PostgreSqlContext -p src/EllieBot/EllieBot.csproj
|
||||||
dotnet ef migrations add $migrationName -o Migrations/Sqlite -c MysqlContext -p src/EllieBot/EllieBot.csproj
|
|
||||||
}
|
}
|
11
privacy-policy.md
Normal file
11
privacy-policy.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Privacy Policy
|
||||||
|
|
||||||
|
## Profile Information
|
||||||
|
Ellie stores userids, avatars, usernames, discriminators and nicknames of users who were targeted by or have used commands which require Xp, Clubs or Waifu features (not limited to these, as other features may be added over time).
|
||||||
|
|
||||||
|
## Other
|
||||||
|
Ellie doesn't do analytics, doesn't store messages, doesn't track users, doesn't store their emails etc.
|
||||||
|
Ellie only stores user settings and states as the result of executed commands or as the effect of administration tools (for example warnings or protection commands).
|
||||||
|
|
||||||
|
## Sensitive Information
|
||||||
|
Ellie doesn't store sensitive information, and users are strongly discouraged from adding their passwords, keys, or other important information as quotes or expressions.
|
|
@ -1,3 +1,2 @@
|
||||||
dotnet ef migrations remove -c SqliteContext -f -p src/EllieBot/EllieBot.csproj
|
dotnet ef migrations remove -c SqliteContext -f -p src/EllieBot/EllieBot.csproj
|
||||||
dotnet ef migrations remove -c PostgreSqlContext -f -p src/EllieBot/EllieBot.csproj
|
dotnet ef migrations remove -c PostgreSqlContext -f -p src/EllieBot/EllieBot.csproj
|
||||||
dotnet ef migrations remove -c MysqlContext -f -p src/EllieBot/EllieBot.csproj
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace EllieBot.Marmalade;
|
namespace EllieBot.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Marks the class as a service which can be used within the same Medusa
|
/// Marks the class as a service which can be used within the same Marmalade
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class svcAttribute : Attribute
|
public class svcAttribute : Attribute
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
using EllieBot;
|
|
||||||
|
|
||||||
namespace EllieBot.Marmalade;
|
namespace EllieBot.Marmalade;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Discord.Net.Core" Version="3.204.0" />
|
<PackageReference Include="Discord.Net.Core" Version="3.15.3" />
|
||||||
<PackageReference Include="Serilog" Version="3.1.1" />
|
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||||
<PackageReference Include="YamlDotNet" Version="15.1.4" />
|
<PackageReference Include="YamlDotNet" Version="15.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" PrivateAssets="all" GeneratePathProperty="true" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" PrivateAssets="all" GeneratePathProperty="true" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
147
src/EllieBot.Generators/GrpcApiPermGenerator.cs
Normal file
147
src/EllieBot.Generators/GrpcApiPermGenerator.cs
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
#nullable enable
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Collections.Immutable;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.CodeAnalysis;
|
||||||
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
|
using Microsoft.CodeAnalysis.Text;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace EllieBot.Generators
|
||||||
|
{
|
||||||
|
public readonly record struct MethodPermData
|
||||||
|
{
|
||||||
|
public readonly string Name;
|
||||||
|
public readonly string Value;
|
||||||
|
|
||||||
|
public MethodPermData(string name, string value)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Generator]
|
||||||
|
public class GrpcApiPermGenerator : IIncrementalGenerator
|
||||||
|
{
|
||||||
|
public const string Attribute =
|
||||||
|
"""
|
||||||
|
namespace EllieBot.GrpcApi;
|
||||||
|
|
||||||
|
[System.AttributeUsage(System.AttributeTargets.Method)]
|
||||||
|
public class GrpcApiPermAttribute : System.Attribute
|
||||||
|
{
|
||||||
|
public GuildPerm Value { get; }
|
||||||
|
public GrpcApiPermAttribute(GuildPerm value) => Value = value;
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||||
|
{
|
||||||
|
context.RegisterPostInitializationOutput(ctx => ctx.AddSource("GrpcApiPermAttribute.cs",
|
||||||
|
SourceText.From(Attribute, Encoding.UTF8)));
|
||||||
|
|
||||||
|
var enumsToGenerate = context.SyntaxProvider
|
||||||
|
.ForAttributeWithMetadataName(
|
||||||
|
"EllieBot.GrpcApi.GrpcApiPermAttribute",
|
||||||
|
predicate: static (s, _) => s is MethodDeclarationSyntax,
|
||||||
|
transform: static (ctx, _) => GetMethodSemanticTargets(ctx.SemanticModel, ctx.TargetNode))
|
||||||
|
.Where(static m => m is not null)
|
||||||
|
.Select(static (x, _) => x!.Value)
|
||||||
|
.Collect();
|
||||||
|
|
||||||
|
context.RegisterSourceOutput(enumsToGenerate,
|
||||||
|
static (spc, source) => Execute(source, spc));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static MethodPermData? GetMethodSemanticTargets(SemanticModel model, SyntaxNode node)
|
||||||
|
{
|
||||||
|
var method = (MethodDeclarationSyntax)node;
|
||||||
|
|
||||||
|
var name = method.Identifier.Text;
|
||||||
|
var attr = method.AttributeLists
|
||||||
|
.SelectMany(x => x.Attributes)
|
||||||
|
.FirstOrDefault();
|
||||||
|
// .FirstOrDefault(x => x.Name.ToString() == "GrpcApiPermAttribute");
|
||||||
|
|
||||||
|
|
||||||
|
if (attr is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// if (model.GetSymbolInfo(attr).Symbol is not IMethodSymbol attrSymbol)
|
||||||
|
// return null;
|
||||||
|
|
||||||
|
return new MethodPermData(name, attr.ArgumentList.Arguments[0].ToString() ?? "__missing_perm__");
|
||||||
|
// return new MethodPermData(name, attrSymbol.Parameters[0].ContainingType.ToDisplayString() + "." + attrSymbol.Parameters[0].Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Execute(ImmutableArray<MethodPermData> fields, SourceProductionContext ctx)
|
||||||
|
{
|
||||||
|
using (var stringWriter = new StringWriter())
|
||||||
|
using (var sw = new IndentedTextWriter(stringWriter))
|
||||||
|
{
|
||||||
|
sw.WriteLine("using System.Collections.Frozen;");
|
||||||
|
sw.WriteLine();
|
||||||
|
sw.WriteLine("namespace EllieBot.GrpcApi;");
|
||||||
|
sw.WriteLine();
|
||||||
|
|
||||||
|
sw.WriteLine("public partial class PermsInterceptor");
|
||||||
|
sw.WriteLine("{");
|
||||||
|
|
||||||
|
sw.Indent++;
|
||||||
|
|
||||||
|
sw.WriteLine("public static FrozenDictionary<string, GuildPerm> perms = new Dictionary<string, GuildPerm>()");
|
||||||
|
sw.WriteLine("{");
|
||||||
|
|
||||||
|
sw.Indent++;
|
||||||
|
foreach (var field in fields)
|
||||||
|
{
|
||||||
|
sw.WriteLine("{{ \"{0}\", {1} }},", field.Name, field.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
sw.Indent--;
|
||||||
|
sw.WriteLine("}.ToFrozenDictionary();");
|
||||||
|
|
||||||
|
sw.Indent--;
|
||||||
|
sw.WriteLine("}");
|
||||||
|
|
||||||
|
sw.Flush();
|
||||||
|
ctx.AddSource("GrpcApiInterceptor.g.cs", stringWriter.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<TranslationPair> GetFields(string? dataText)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(dataText))
|
||||||
|
return new();
|
||||||
|
|
||||||
|
Dictionary<string, string> data;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var output = JsonConvert.DeserializeObject<Dictionary<string, string>>(dataText!);
|
||||||
|
if (output is null)
|
||||||
|
return new();
|
||||||
|
|
||||||
|
data = output;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Debug.WriteLine("Failed parsing responses file.");
|
||||||
|
return new();
|
||||||
|
}
|
||||||
|
|
||||||
|
var list = new List<TranslationPair>();
|
||||||
|
foreach (var entry in data)
|
||||||
|
{
|
||||||
|
list.Add(new(
|
||||||
|
entry.Key,
|
||||||
|
entry.Value
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
21
src/EllieBot.GrpcApiBase/EllieBot.GrpcApiBase.csproj
Normal file
21
src/EllieBot.GrpcApiBase/EllieBot.GrpcApiBase.csproj
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Google.Protobuf" Version="3.28.2" />
|
||||||
|
<PackageReference Include="Grpc" Version="2.46.6" />
|
||||||
|
<PackageReference Include="Grpc.Tools" Version="2.66.0" PrivateAssets="All" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Protobuf Include="protos/*.proto">
|
||||||
|
<GrpcServices>Server</GrpcServices>
|
||||||
|
</Protobuf>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
26
src/EllieBot.GrpcApiBase/protos/econ.proto
Normal file
26
src/EllieBot.GrpcApiBase/protos/econ.proto
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "EllieBot.GrpcApi";
|
||||||
|
|
||||||
|
package econ;
|
||||||
|
|
||||||
|
service GrpcEcon {
|
||||||
|
rpc GetEconomy(EconomyRequest) returns (EconomyReply);
|
||||||
|
}
|
||||||
|
|
||||||
|
message EconomyRequest {
|
||||||
|
string guildId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message EconomyReply {
|
||||||
|
uint64 totalOwned = 1;
|
||||||
|
uint64 byTopOnePercent = 2;
|
||||||
|
uint64 plantedAmount = 3;
|
||||||
|
uint64 ownedByTheBot = 4;
|
||||||
|
uint64 inTheBank = 5;
|
||||||
|
uint64 totalEconomy = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CurrencyLbRequest {
|
||||||
|
int32 page = 1;
|
||||||
|
}
|
50
src/EllieBot.GrpcApiBase/protos/exprs.proto
Normal file
50
src/EllieBot.GrpcApiBase/protos/exprs.proto
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "EllieBot.GrpcApi";
|
||||||
|
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
|
||||||
|
package exprs;
|
||||||
|
|
||||||
|
service GrpcExprs {
|
||||||
|
rpc GetExprs(GetExprsRequest) returns (GetExprsReply);
|
||||||
|
rpc AddExpr(AddExprRequest) returns (AddExprReply);
|
||||||
|
rpc DeleteExpr(DeleteExprRequest) returns (google.protobuf.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteExprRequest {
|
||||||
|
string id = 1;
|
||||||
|
uint64 guildId = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetExprsRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
string query = 2;
|
||||||
|
int32 page = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetExprsReply {
|
||||||
|
repeated ExprDto expressions = 1;
|
||||||
|
int32 totalCount = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExprDto {
|
||||||
|
string id = 1;
|
||||||
|
string trigger = 2;
|
||||||
|
string response = 3;
|
||||||
|
|
||||||
|
bool ca = 4;
|
||||||
|
bool ad = 5;
|
||||||
|
bool dm = 6;
|
||||||
|
bool at = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddExprRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
ExprDto expr = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddExprReply {
|
||||||
|
string id = 1;
|
||||||
|
bool success = 2;
|
||||||
|
}
|
57
src/EllieBot.GrpcApiBase/protos/greet.proto
Normal file
57
src/EllieBot.GrpcApiBase/protos/greet.proto
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "EllieBot.GrpcApi";
|
||||||
|
|
||||||
|
package greet;
|
||||||
|
|
||||||
|
service GrpcGreet {
|
||||||
|
rpc GetGreetSettings (GetGreetRequest) returns (GetGreetReply);
|
||||||
|
rpc UpdateGreet (UpdateGreetRequest) returns (UpdateGreetReply);
|
||||||
|
rpc TestGreet (TestGreetRequest) returns (TestGreetReply);
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGreetReply {
|
||||||
|
GrpcGreetSettings greet = 1;
|
||||||
|
GrpcGreetSettings greetDm = 2;
|
||||||
|
GrpcGreetSettings bye = 3;
|
||||||
|
GrpcGreetSettings boost = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GrpcGreetSettings {
|
||||||
|
optional uint64 channelId = 1;
|
||||||
|
string message = 2;
|
||||||
|
bool isEnabled = 3;
|
||||||
|
GrpcGreetType type = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGreetRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateGreetRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
GrpcGreetSettings settings = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum GrpcGreetType {
|
||||||
|
Greet = 0;
|
||||||
|
GreetDm = 1;
|
||||||
|
Bye = 2;
|
||||||
|
Boost = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateGreetReply {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TestGreetRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
uint64 channelId = 2;
|
||||||
|
uint64 userId = 3;
|
||||||
|
GrpcGreetType type = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TestGreetReply {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
137
src/EllieBot.GrpcApiBase/protos/other.proto
Normal file
137
src/EllieBot.GrpcApiBase/protos/other.proto
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "EllieBot.GrpcApi";
|
||||||
|
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
package other;
|
||||||
|
|
||||||
|
service GrpcOther {
|
||||||
|
|
||||||
|
rpc GetGuilds(google.protobuf.Empty) returns (GetGuildsReply);
|
||||||
|
rpc GetTextChannels(GetTextChannelsRequest) returns (GetTextChannelsReply);
|
||||||
|
|
||||||
|
rpc GetCurrencyLb(GetLbRequest) returns (CurrencyLbReply);
|
||||||
|
rpc GetXpLb(GetLbRequest) returns (XpLbReply);
|
||||||
|
rpc GetWaifuLb(GetLbRequest) returns (WaifuLbReply);
|
||||||
|
|
||||||
|
rpc GetShardStatuses(google.protobuf.Empty) returns (GetShardStatusesReply);
|
||||||
|
rpc GetServerInfo(ServerInfoRequest) returns (GetServerInfoReply);
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGuildsReply {
|
||||||
|
repeated GuildReply guilds = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GuildReply {
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string iconUrl = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetShardStatusesReply {
|
||||||
|
repeated ShardStatusReply shards = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ShardStatusReply {
|
||||||
|
int32 id = 1;
|
||||||
|
string status = 2;
|
||||||
|
|
||||||
|
int32 guildCount = 3;
|
||||||
|
google.protobuf.Timestamp lastUpdate = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTextChannelsRequest{
|
||||||
|
uint64 guildId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTextChannelsReply {
|
||||||
|
repeated TextChannelReply textChannels = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TextChannelReply {
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CurrencyLbReply {
|
||||||
|
repeated CurrencyLbEntryReply entries = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CurrencyLbEntryReply {
|
||||||
|
string user = 1;
|
||||||
|
uint64 userId = 2;
|
||||||
|
int64 amount = 3;
|
||||||
|
string avatar = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetLbRequest {
|
||||||
|
int32 page = 1;
|
||||||
|
int32 perPage = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message XpLbReply {
|
||||||
|
repeated XpLbEntryReply entries = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message XpLbEntryReply {
|
||||||
|
string user = 1;
|
||||||
|
uint64 userId = 2;
|
||||||
|
int64 totalXp = 3;
|
||||||
|
int64 level = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WaifuLbReply {
|
||||||
|
repeated WaifuLbEntry entries = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WaifuLbEntry {
|
||||||
|
string user = 1;
|
||||||
|
string claimedBy = 2;
|
||||||
|
int64 value = 3;
|
||||||
|
bool isMutual = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ServerInfoRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetServerInfoReply {
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string iconUrl = 3;
|
||||||
|
uint64 ownerId = 4;
|
||||||
|
string ownerName = 5;
|
||||||
|
repeated RoleReply roles = 6;
|
||||||
|
repeated EmojiReply emojis = 7;
|
||||||
|
repeated string features = 8;
|
||||||
|
int32 textChannels = 9;
|
||||||
|
int32 voiceChannels = 10;
|
||||||
|
int32 memberCount = 11;
|
||||||
|
int64 createdAt = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RoleReply {
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string iconUrl = 3;
|
||||||
|
string color = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message EmojiReply {
|
||||||
|
string name = 1;
|
||||||
|
string url = 2;
|
||||||
|
string code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChannelReply {
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
ChannelType type = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ChannelType {
|
||||||
|
Text = 0;
|
||||||
|
Voice = 1;
|
||||||
|
}
|
83
src/EllieBot.GrpcApiBase/protos/warn.proto
Normal file
83
src/EllieBot.GrpcApiBase/protos/warn.proto
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "EllieBot.GrpcApi";
|
||||||
|
|
||||||
|
package warn;
|
||||||
|
|
||||||
|
service GrpcWarn {
|
||||||
|
rpc GetWarnSettings (WarnSettingsRequest) returns (WarnSettingsReply);
|
||||||
|
rpc AddWarnp (AddWarnpRequest) returns (AddWarnpReply);
|
||||||
|
rpc DeleteWarnp (DeleteWarnpRequest) returns (DeleteWarnpReply);
|
||||||
|
rpc GetUserWarnings(GetUserWarningsRequest) returns (GetUserWarningsReply);
|
||||||
|
rpc ClearWarning(ClearWarningRequest) returns (ClearWarningReply);
|
||||||
|
rpc SetWarnExpiry(SetWarnExpiryRequest) returns (SetWarnExpiryReply);
|
||||||
|
}
|
||||||
|
message WarnSettingsRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WarnPunishment {
|
||||||
|
int32 threshold = 1;
|
||||||
|
string action = 2;
|
||||||
|
int64 duration = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WarnSettingsReply {
|
||||||
|
repeated WarnPunishment punishments = 1;
|
||||||
|
int32 expiryDays = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddWarnpRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
WarnPunishment punishment = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddWarnpReply {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteWarnpRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
int32 warnpIndex = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteWarnpReply {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserWarningsRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
uint64 user_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserWarningsReply {
|
||||||
|
repeated Warning warnings = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Warning {
|
||||||
|
int32 id = 1;
|
||||||
|
string reason = 2;
|
||||||
|
int64 timestamp = 3;
|
||||||
|
int64 expiry_timestamp = 4;
|
||||||
|
bool cleared = 5;
|
||||||
|
string clearedBy = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClearWarningRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
uint64 userId = 2;
|
||||||
|
optional int32 warnId = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClearWarningReply {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetWarnExpiryRequest {
|
||||||
|
uint64 guildId = 1;
|
||||||
|
int32 expiryDays = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetWarnExpiryReply {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
|
@ -1,76 +0,0 @@
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Ellie.Common;
|
|
||||||
using EllieBot.Services;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace EllieBot.Tests
|
|
||||||
{
|
|
||||||
public class GroupGreetTests
|
|
||||||
{
|
|
||||||
private GreetGrouper<int> _grouper;
|
|
||||||
|
|
||||||
[SetUp]
|
|
||||||
public void Setup()
|
|
||||||
=> _grouper = new GreetGrouper<int>();
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CreateTest()
|
|
||||||
{
|
|
||||||
var created = _grouper.CreateOrAdd(0, 5);
|
|
||||||
|
|
||||||
Assert.True(created);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CreateClearTest()
|
|
||||||
{
|
|
||||||
_grouper.CreateOrAdd(0, 5);
|
|
||||||
_grouper.ClearGroup(0, 5, out var items);
|
|
||||||
|
|
||||||
Assert.AreEqual(0, items.Count());
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void NotCreatedTest()
|
|
||||||
{
|
|
||||||
_grouper.CreateOrAdd(0, 5);
|
|
||||||
var created = _grouper.CreateOrAdd(0, 4);
|
|
||||||
|
|
||||||
Assert.False(created);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void ClearAddedTest()
|
|
||||||
{
|
|
||||||
_grouper.CreateOrAdd(0, 5);
|
|
||||||
_grouper.CreateOrAdd(0, 4);
|
|
||||||
_grouper.ClearGroup(0, 5, out var items);
|
|
||||||
|
|
||||||
var list = items.ToList();
|
|
||||||
|
|
||||||
Assert.AreEqual(1, list.Count, $"Count was {list.Count}");
|
|
||||||
Assert.AreEqual(4, list[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public async Task ClearManyTest()
|
|
||||||
{
|
|
||||||
_grouper.CreateOrAdd(0, 5);
|
|
||||||
|
|
||||||
// add 15 items
|
|
||||||
await Enumerable.Range(10, 15)
|
|
||||||
.Select(x => Task.Run(() => _grouper.CreateOrAdd(0, x))).WhenAll();
|
|
||||||
|
|
||||||
// get 5 at most
|
|
||||||
_grouper.ClearGroup(0, 5, out var items);
|
|
||||||
var list = items.ToList();
|
|
||||||
Assert.AreEqual(5, list.Count, $"Count was {list.Count}");
|
|
||||||
|
|
||||||
// try to get 15, but there should be 10 left
|
|
||||||
_grouper.ClearGroup(0, 15, out items);
|
|
||||||
list = items.ToList();
|
|
||||||
Assert.AreEqual(10, list.Count, $"Count was {list.Count}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -77,7 +77,6 @@ csharp_style_var_when_type_is_apparent = true:suggestion
|
||||||
|
|
||||||
# Expression-bodied members
|
# Expression-bodied members
|
||||||
csharp_style_expression_bodied_accessors = true:suggestion
|
csharp_style_expression_bodied_accessors = true:suggestion
|
||||||
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
|
|
||||||
csharp_style_expression_bodied_indexers = true:suggestion
|
csharp_style_expression_bodied_indexers = true:suggestion
|
||||||
csharp_style_expression_bodied_lambdas = true:suggestion
|
csharp_style_expression_bodied_lambdas = true:suggestion
|
||||||
csharp_style_expression_bodied_local_functions = true:suggestion
|
csharp_style_expression_bodied_local_functions = true:suggestion
|
||||||
|
@ -181,9 +180,9 @@ dotnet_naming_rule.private_readonly_field.symbols = private_readonly_field
|
||||||
dotnet_naming_rule.private_readonly_field.style = begins_with_underscore
|
dotnet_naming_rule.private_readonly_field.style = begins_with_underscore
|
||||||
dotnet_naming_rule.private_readonly_field.severity = warning
|
dotnet_naming_rule.private_readonly_field.severity = warning
|
||||||
|
|
||||||
dotnet_naming_rule.private_field.symbols = private_field
|
# dotnet_naming_rule.private_field.symbols = private_field
|
||||||
dotnet_naming_rule.private_field.style = camel_case
|
# dotnet_naming_rule.private_field.style = camel_case
|
||||||
dotnet_naming_rule.private_field.severity = warning
|
# dotnet_naming_rule.private_field.severity = warning
|
||||||
|
|
||||||
dotnet_naming_rule.const_fields.symbols = const_fields
|
dotnet_naming_rule.const_fields.symbols = const_fields
|
||||||
dotnet_naming_rule.const_fields.style = all_upper
|
dotnet_naming_rule.const_fields.style = all_upper
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
using DryIoc;
|
using DryIoc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using EllieBot.Common.Configs;
|
using EllieBot.Common.Configs;
|
||||||
|
@ -24,7 +25,7 @@ public sealed class Bot : IBot
|
||||||
public bool IsReady { get; private set; }
|
public bool IsReady { get; private set; }
|
||||||
public int ShardId { get; set; }
|
public int ShardId { get; set; }
|
||||||
|
|
||||||
private readonly IBotCredentials _creds;
|
private readonly IBotCreds _creds;
|
||||||
private readonly CommandService _commandService;
|
private readonly CommandService _commandService;
|
||||||
private readonly DbService _db;
|
private readonly DbService _db;
|
||||||
|
|
||||||
|
@ -41,6 +42,9 @@ public sealed class Bot : IBot
|
||||||
_credsProvider = new BotCredsProvider(totalShards, credPath);
|
_credsProvider = new BotCredsProvider(totalShards, credPath);
|
||||||
_creds = _credsProvider.GetCreds();
|
_creds = _credsProvider.GetCreds();
|
||||||
|
|
||||||
|
LogSetup.SetupLogger(shardId, _creds);
|
||||||
|
Log.Information("Pid: {ProcessId}", Environment.ProcessId);
|
||||||
|
|
||||||
_db = new EllieDbService(_credsProvider);
|
_db = new EllieDbService(_credsProvider);
|
||||||
|
|
||||||
var messageCacheSize =
|
var messageCacheSize =
|
||||||
|
@ -88,18 +92,18 @@ public sealed class Bot : IBot
|
||||||
|
|
||||||
|
|
||||||
public IReadOnlyList<ulong> GetCurrentGuildIds()
|
public IReadOnlyList<ulong> GetCurrentGuildIds()
|
||||||
=> Client.Guilds.Select(x => x.Id).ToList();
|
=> Client.Guilds.Select(x => x.Id).ToList().AsReadOnly();
|
||||||
|
|
||||||
private void AddServices()
|
private async Task AddServices()
|
||||||
{
|
{
|
||||||
var startingGuildIdList = GetCurrentGuildIds();
|
var startingGuildIdList = GetCurrentGuildIds().ToList();
|
||||||
var sw = Stopwatch.StartNew();
|
var startTime = Stopwatch.GetTimestamp();
|
||||||
var bot = Client.CurrentUser;
|
var bot = Client.CurrentUser;
|
||||||
|
|
||||||
using (var uow = _db.GetDbContext())
|
await using (var uow = _db.GetDbContext())
|
||||||
{
|
{
|
||||||
|
AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList);
|
||||||
uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId);
|
uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId);
|
||||||
AllGuildConfigs = uow.Set<GuildConfig>().GetAllGuildConfigs(startingGuildIdList).ToImmutableArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// var svcs = new StandardKernel(new NinjectSettings()
|
// var svcs = new StandardKernel(new NinjectSettings()
|
||||||
|
@ -110,11 +114,11 @@ public sealed class Bot : IBot
|
||||||
|
|
||||||
var svcs = new Container();
|
var svcs = new Container();
|
||||||
|
|
||||||
// this is required in order for medusa unloading to work
|
// this is required in order for marmalade unloading to work
|
||||||
// svcs.Components.Remove<IPlanner, Planner>();
|
// svcs.Components.Remove<IPlanner, Planner>();
|
||||||
// svcs.Components.Add<IPlanner, RemovablePlanner>();
|
// svcs.Components.Add<IPlanner, RemovablePlanner>();
|
||||||
|
|
||||||
svcs.AddSingleton<IBotCredentials, IBotCredentials>(_ => _credsProvider.GetCreds());
|
svcs.AddSingleton<IBotCreds>(_ => _credsProvider.GetCreds());
|
||||||
svcs.AddSingleton<DbService, DbService>(_db);
|
svcs.AddSingleton<DbService, DbService>(_db);
|
||||||
svcs.AddSingleton<IBotCredsProvider>(_credsProvider);
|
svcs.AddSingleton<IBotCredsProvider>(_credsProvider);
|
||||||
svcs.AddSingleton<DiscordSocketClient>(Client);
|
svcs.AddSingleton<DiscordSocketClient>(Client);
|
||||||
|
@ -161,8 +165,8 @@ public sealed class Bot : IBot
|
||||||
LoadTypeReaders(a);
|
LoadTypeReaders(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
sw.Stop();
|
Log.Information("All services loaded in {ServiceLoadTime:F2}s",
|
||||||
Log.Information("All services loaded in {ServiceLoadTime:F2}s", sw.Elapsed.TotalSeconds);
|
Stopwatch.GetElapsedTime(startTime).TotalSeconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadTypeReaders(Assembly assembly)
|
private void LoadTypeReaders(Assembly assembly)
|
||||||
|
@ -259,14 +263,14 @@ public sealed class Bot : IBot
|
||||||
if (ShardId == 0)
|
if (ShardId == 0)
|
||||||
await _db.SetupAsync();
|
await _db.SetupAsync();
|
||||||
|
|
||||||
var sw = Stopwatch.StartNew();
|
var startTime = Stopwatch.GetTimestamp();
|
||||||
|
|
||||||
await LoginAsync(_creds.Token);
|
await LoginAsync(_creds.Token);
|
||||||
|
|
||||||
Log.Information("Shard {ShardId} loading services...", Client.ShardId);
|
Log.Information("Shard {ShardId} loading services...", Client.ShardId);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AddServices();
|
await AddServices();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -274,8 +278,9 @@ public sealed class Bot : IBot
|
||||||
Helpers.ReadErrorAndExit(9);
|
Helpers.ReadErrorAndExit(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
sw.Stop();
|
Log.Information("Shard {ShardId} connected in {Elapsed:F2}s",
|
||||||
Log.Information("Shard {ShardId} connected in {Elapsed:F2}s", Client.ShardId, sw.Elapsed.TotalSeconds);
|
Client.ShardId,
|
||||||
|
Stopwatch.GetElapsedTime(startTime).TotalSeconds);
|
||||||
var commandHandler = Services.GetRequiredService<CommandHandler>();
|
var commandHandler = Services.GetRequiredService<CommandHandler>();
|
||||||
|
|
||||||
// start handling messages received in commandhandler
|
// start handling messages received in commandhandler
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using EllieBot.Db.Models;
|
using EllieBot.Db.Models;
|
||||||
|
@ -10,6 +10,7 @@ namespace EllieBot.Db;
|
||||||
public abstract class EllieContext : DbContext
|
public abstract class EllieContext : DbContext
|
||||||
{
|
{
|
||||||
public DbSet<GuildConfig> GuildConfigs { get; set; }
|
public DbSet<GuildConfig> GuildConfigs { get; set; }
|
||||||
|
public DbSet<GreetSettings> GreetSettings { get; set; }
|
||||||
|
|
||||||
public DbSet<Quote> Quotes { get; set; }
|
public DbSet<Quote> Quotes { get; set; }
|
||||||
public DbSet<Reminder> Reminders { get; set; }
|
public DbSet<Reminder> Reminders { get; set; }
|
||||||
|
@ -59,6 +60,7 @@ public abstract class EllieContext : DbContext
|
||||||
|
|
||||||
public DbSet<TodoModel> Todos { get; set; }
|
public DbSet<TodoModel> Todos { get; set; }
|
||||||
public DbSet<ArchivedTodoListModel> TodosArchive { get; set; }
|
public DbSet<ArchivedTodoListModel> TodosArchive { get; set; }
|
||||||
|
public DbSet<HoneypotChannel> HoneyPotChannels { get; set; }
|
||||||
|
|
||||||
// todo add guild colors
|
// todo add guild colors
|
||||||
// public DbSet<GuildColors> GuildColors { get; set; }
|
// public DbSet<GuildColors> GuildColors { get; set; }
|
||||||
|
@ -677,6 +679,29 @@ public abstract class EllieContext : DbContext
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region GreetSettings
|
||||||
|
|
||||||
|
modelBuilder
|
||||||
|
.Entity<GreetSettings>(gs => gs.HasIndex(x => new
|
||||||
|
{
|
||||||
|
x.GuildId,
|
||||||
|
x.GreetType
|
||||||
|
})
|
||||||
|
.IsUnique());
|
||||||
|
|
||||||
|
modelBuilder.Entity<GreetSettings>(gs =>
|
||||||
|
{
|
||||||
|
gs
|
||||||
|
.Property(x => x.IsEnabled)
|
||||||
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
|
gs
|
||||||
|
.Property(x => x.AutoDeleteTimer)
|
||||||
|
.HasDefaultValue(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|
|
@ -44,8 +44,6 @@ public sealed class EllieDbService : DbService
|
||||||
case "postgres":
|
case "postgres":
|
||||||
case "pgsql":
|
case "pgsql":
|
||||||
return new PostgreSqlContext(connString);
|
return new PostgreSqlContext(connString);
|
||||||
case "mysql":
|
|
||||||
return new MysqlContext(connString);
|
|
||||||
case "sqlite":
|
case "sqlite":
|
||||||
return new SqliteContext(connString);
|
return new SqliteContext(connString);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
using LinqToDB.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using EllieBot.Db.Models;
|
using EllieBot.Db.Models;
|
||||||
|
|
||||||
|
@ -42,19 +43,28 @@ public static class GuildConfigExtensions
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IQueryable<GuildConfig> IncludeEverything(this DbSet<GuildConfig> configs)
|
private static IQueryable<GuildConfig> IncludeEverything(this DbSet<GuildConfig> configs)
|
||||||
=> configs.AsQueryable()
|
=> configs
|
||||||
.AsSplitQuery()
|
.AsSplitQuery()
|
||||||
.Include(gc => gc.CommandCooldowns)
|
.Include(gc => gc.CommandCooldowns)
|
||||||
.Include(gc => gc.FollowedStreams)
|
.Include(gc => gc.FollowedStreams)
|
||||||
.Include(gc => gc.StreamRole)
|
.Include(gc => gc.StreamRole)
|
||||||
|
.Include(gc => gc.DelMsgOnCmdChannels)
|
||||||
.Include(gc => gc.XpSettings)
|
.Include(gc => gc.XpSettings)
|
||||||
.ThenInclude(x => x.ExclusionList)
|
.ThenInclude(x => x.ExclusionList);
|
||||||
.Include(gc => gc.DelMsgOnCmdChannels);
|
|
||||||
|
|
||||||
public static IEnumerable<GuildConfig> GetAllGuildConfigs(
|
public static async Task<GuildConfig[]> GetAllGuildConfigs(
|
||||||
this DbSet<GuildConfig> configs,
|
this DbSet<GuildConfig> configs,
|
||||||
IReadOnlyList<ulong> availableGuilds)
|
List<ulong> availableGuilds)
|
||||||
=> configs.IncludeEverything().AsNoTracking().Where(x => availableGuilds.Contains(x.GuildId)).ToList();
|
{
|
||||||
|
var result = await configs
|
||||||
|
.AsQueryable()
|
||||||
|
.Include(x => x.CommandCooldowns)
|
||||||
|
.Where(x => availableGuilds.Contains(x.GuildId))
|
||||||
|
.AsNoTracking()
|
||||||
|
.ToArrayAsync();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and creates if it doesn't exist a config for a guild.
|
/// Gets and creates if it doesn't exist a config for a guild.
|
||||||
|
@ -80,7 +90,8 @@ public static class GuildConfigExtensions
|
||||||
|
|
||||||
if (config is null)
|
if (config is null)
|
||||||
{
|
{
|
||||||
ctx.Set<GuildConfig>().Add(config = new()
|
ctx.Set<GuildConfig>()
|
||||||
|
.Add(config = new()
|
||||||
{
|
{
|
||||||
GuildId = guildId,
|
GuildId = guildId,
|
||||||
Permissions = Permissionv2.GetDefaultPermlist,
|
Permissions = Permissionv2.GetDefaultPermlist,
|
||||||
|
@ -149,14 +160,16 @@ public static class GuildConfigExtensions
|
||||||
|
|
||||||
public static GuildConfig GcWithPermissionsFor(this DbContext ctx, ulong guildId)
|
public static GuildConfig GcWithPermissionsFor(this DbContext ctx, ulong guildId)
|
||||||
{
|
{
|
||||||
var config = ctx.Set<GuildConfig>().AsQueryable()
|
var config = ctx.Set<GuildConfig>()
|
||||||
|
.AsQueryable()
|
||||||
.Where(gc => gc.GuildId == guildId)
|
.Where(gc => gc.GuildId == guildId)
|
||||||
.Include(gc => gc.Permissions)
|
.Include(gc => gc.Permissions)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (config is null) // if there is no guildconfig, create new one
|
if (config is null) // if there is no guildconfig, create new one
|
||||||
{
|
{
|
||||||
ctx.Set<GuildConfig>().Add(config = new()
|
ctx.Set<GuildConfig>()
|
||||||
|
.Add(config = new()
|
||||||
{
|
{
|
||||||
GuildId = guildId,
|
GuildId = guildId,
|
||||||
Permissions = Permissionv2.GetDefaultPermlist
|
Permissions = Permissionv2.GetDefaultPermlist
|
||||||
|
@ -182,15 +195,6 @@ public static class GuildConfigExtensions
|
||||||
.SelectMany(gc => gc.FollowedStreams)
|
.SelectMany(gc => gc.FollowedStreams)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
public static void SetCleverbotEnabled(this DbSet<GuildConfig> configs, ulong id, bool cleverbotEnabled)
|
|
||||||
{
|
|
||||||
var conf = configs.FirstOrDefault(gc => gc.GuildId == id);
|
|
||||||
|
|
||||||
if (conf is null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
conf.CleverbotEnabled = cleverbotEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId)
|
public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#nullable disable
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using EllieBot.Db.Models;
|
|
||||||
|
|
||||||
namespace EllieBot.Db;
|
|
||||||
|
|
||||||
public static class QuoteExtensions
|
|
||||||
{
|
|
||||||
public static IEnumerable<Quote> GetForGuild(this DbSet<Quote> quotes, ulong guildId)
|
|
||||||
=> quotes.AsQueryable().Where(x => x.GuildId == guildId);
|
|
||||||
|
|
||||||
public static IReadOnlyCollection<Quote> GetGroup(
|
|
||||||
this DbSet<Quote> quotes,
|
|
||||||
ulong guildId,
|
|
||||||
int page,
|
|
||||||
OrderType order)
|
|
||||||
{
|
|
||||||
var q = quotes.AsQueryable().Where(x => x.GuildId == guildId);
|
|
||||||
if (order == OrderType.Keyword)
|
|
||||||
q = q.OrderBy(x => x.Keyword);
|
|
||||||
else
|
|
||||||
q = q.OrderBy(x => x.Id);
|
|
||||||
|
|
||||||
return q.Skip(15 * page).Take(15).ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async Task<Quote> GetRandomQuoteByKeywordAsync(
|
|
||||||
this DbSet<Quote> quotes,
|
|
||||||
ulong guildId,
|
|
||||||
string keyword)
|
|
||||||
{
|
|
||||||
return (await quotes.AsQueryable().Where(q => q.GuildId == guildId && q.Keyword == keyword).ToArrayAsync())
|
|
||||||
.RandomOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async Task<Quote> SearchQuoteKeywordTextAsync(
|
|
||||||
this DbSet<Quote> quotes,
|
|
||||||
ulong guildId,
|
|
||||||
string keyword,
|
|
||||||
string text)
|
|
||||||
{
|
|
||||||
return (await quotes.AsQueryable()
|
|
||||||
.Where(q => q.GuildId == guildId
|
|
||||||
&& (keyword == null || q.Keyword == keyword)
|
|
||||||
&& (EF.Functions.Like(q.Text.ToUpper(), $"%{text.ToUpper()}%")
|
|
||||||
|| EF.Functions.Like(q.AuthorName, text)))
|
|
||||||
.ToArrayAsync())
|
|
||||||
.RandomOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void RemoveAllByKeyword(this DbSet<Quote> quotes, ulong guildId, string keyword)
|
|
||||||
=> quotes.RemoveRange(quotes.AsQueryable().Where(x => x.GuildId == guildId && x.Keyword.ToUpper() == keyword));
|
|
||||||
}
|
|
|
@ -26,17 +26,6 @@ public static class UserXpExtensions
|
||||||
return usr;
|
return usr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<IReadOnlyCollection<UserXpStats>> GetUsersFor(
|
|
||||||
this DbSet<UserXpStats> xps,
|
|
||||||
ulong guildId,
|
|
||||||
int page)
|
|
||||||
=> await xps.ToLinqToDBTable()
|
|
||||||
.Where(x => x.GuildId == guildId)
|
|
||||||
.OrderByDescending(x => x.Xp + x.AwardedXp)
|
|
||||||
.Skip(page * 9)
|
|
||||||
.Take(9)
|
|
||||||
.ToArrayAsyncLinqToDB();
|
|
||||||
|
|
||||||
public static async Task<List<UserXpStats>> GetTopUserXps(this DbSet<UserXpStats> xps, ulong guildId, int count)
|
public static async Task<List<UserXpStats>> GetTopUserXps(this DbSet<UserXpStats> xps, ulong guildId, int count)
|
||||||
=> await xps.ToLinqToDBTable()
|
=> await xps.ToLinqToDBTable()
|
||||||
.Where(x => x.GuildId == guildId)
|
.Where(x => x.GuildId == guildId)
|
||||||
|
|
|
@ -13,21 +13,23 @@ public class GuildConfig : DbEntity
|
||||||
|
|
||||||
public string AutoAssignRoleIds { get; set; }
|
public string AutoAssignRoleIds { get; set; }
|
||||||
|
|
||||||
//greet stuff
|
// //greet stuff
|
||||||
public int AutoDeleteGreetMessagesTimer { get; set; } = 30;
|
// public int AutoDeleteGreetMessagesTimer { get; set; } = 30;
|
||||||
public int AutoDeleteByeMessagesTimer { get; set; } = 30;
|
// public int AutoDeleteByeMessagesTimer { get; set; } = 30;
|
||||||
|
//
|
||||||
public ulong GreetMessageChannelId { get; set; }
|
// public ulong GreetMessageChannelId { get; set; }
|
||||||
public ulong ByeMessageChannelId { get; set; }
|
// public ulong ByeMessageChannelId { get; set; }
|
||||||
|
//
|
||||||
public bool SendDmGreetMessage { get; set; }
|
// public bool SendDmGreetMessage { get; set; }
|
||||||
public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!";
|
// public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!";
|
||||||
|
//
|
||||||
public bool SendChannelGreetMessage { get; set; }
|
// public bool SendChannelGreetMessage { get; set; }
|
||||||
public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!";
|
// public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!";
|
||||||
|
//
|
||||||
public bool SendChannelByeMessage { get; set; }
|
// public bool SendChannelByeMessage { get; set; }
|
||||||
public string ChannelByeMessageText { get; set; } = "%user% has left!";
|
// public string ChannelByeMessageText { get; set; } = "%user% has left!";
|
||||||
|
// public bool SendBoostMessage { get; set; }
|
||||||
|
// pulic int BoostMessageDeleteAfter { get; set; }
|
||||||
|
|
||||||
//self assignable roles
|
//self assignable roles
|
||||||
public bool ExclusiveSelfAssignedRoles { get; set; }
|
public bool ExclusiveSelfAssignedRoles { get; set; }
|
||||||
|
@ -98,10 +100,6 @@ public class GuildConfig : DbEntity
|
||||||
|
|
||||||
#region Boost Message
|
#region Boost Message
|
||||||
|
|
||||||
public bool SendBoostMessage { get; set; }
|
|
||||||
public string BoostMessage { get; set; } = "%user% just boosted this server!";
|
|
||||||
public ulong BoostMessageChannelId { get; set; }
|
|
||||||
public int BoostMessageDeleteAfter { get; set; }
|
|
||||||
public bool StickyRoles { get; set; }
|
public bool StickyRoles { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
11
src/EllieBot/Db/Models/HoneypotChannel.cs
Normal file
11
src/EllieBot/Db/Models/HoneypotChannel.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace EllieBot.Db.Models;
|
||||||
|
|
||||||
|
public class HoneypotChannel
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public ulong GuildId { get; set; }
|
||||||
|
|
||||||
|
public ulong ChannelId { get; set; }
|
||||||
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace EllieBot.Db.Models;
|
namespace EllieBot.Db.Models;
|
||||||
|
|
||||||
|
|
||||||
public class AntiRaidSetting : DbEntity
|
public class AntiRaidSetting : DbEntity
|
||||||
{
|
{
|
||||||
public int GuildConfigId { get; set; }
|
public int GuildConfigId { get; set; }
|
||||||
|
|
|
@ -9,5 +9,3 @@ public class UserXpStats : DbEntity
|
||||||
public long AwardedXp { get; set; }
|
public long AwardedXp { get; set; }
|
||||||
public XpNotificationLocation NotifyOnLevelUp { get; set; }
|
public XpNotificationLocation NotifyOnLevelUp { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum XpNotificationLocation { None, Dm, Channel }
|
|
8
src/EllieBot/Db/Models/xp/XpNotificationLocation.cs
Normal file
8
src/EllieBot/Db/Models/xp/XpNotificationLocation.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace EllieBot.Db.Models;
|
||||||
|
|
||||||
|
public enum XpNotificationLocation
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Dm,
|
||||||
|
Channel
|
||||||
|
}
|
|
@ -1,38 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using EllieBot.Db.Models;
|
|
||||||
|
|
||||||
namespace EllieBot.Db;
|
|
||||||
|
|
||||||
public sealed class MysqlContext : EllieContext
|
|
||||||
{
|
|
||||||
private readonly string _connStr;
|
|
||||||
private readonly string _version;
|
|
||||||
|
|
||||||
protected override string CurrencyTransactionOtherIdDefaultValue
|
|
||||||
=> "NULL";
|
|
||||||
|
|
||||||
public MysqlContext(string connStr = "Server=localhost", string version = "8.0")
|
|
||||||
{
|
|
||||||
_connStr = connStr;
|
|
||||||
_version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
||||||
{
|
|
||||||
base.OnConfiguring(optionsBuilder);
|
|
||||||
optionsBuilder
|
|
||||||
.UseLowerCaseNamingConvention()
|
|
||||||
.UseMySql(_connStr, ServerVersion.Parse(_version));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
base.OnModelCreating(modelBuilder);
|
|
||||||
|
|
||||||
// mysql is case insensitive by default
|
|
||||||
// we can set binary collation to change that
|
|
||||||
modelBuilder.Entity<ClubInfo>()
|
|
||||||
.Property(x => x.Name)
|
|
||||||
.UseCollation("utf8mb4_bin");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
<Version>5.1.0</Version>
|
<Version>5.1.14</Version>
|
||||||
|
|
||||||
<!-- Output/build -->
|
<!-- Output/build -->
|
||||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||||
|
@ -27,83 +27,82 @@
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Publish>True</Publish>
|
<Publish>True</Publish>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.6"/>
|
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.6" />
|
||||||
<PackageReference Include="CommandLineParser" Version="2.9.1"/>
|
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||||
<PackageReference Include="Discord.Net" Version="3.204.0"/>
|
<PackageReference Include="Discord.Net" Version="3.15.3" />
|
||||||
<PackageReference Include="CoreCLR-NCalc" Version="3.1.246"/>
|
<PackageReference Include="CoreCLR-NCalc" Version="3.1.246" />
|
||||||
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138"/>
|
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
||||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.68.0.3414"/>
|
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.68.0.3414" />
|
||||||
<PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084"/>
|
<PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084" />
|
||||||
<!-- <PackageReference Include="Grpc.AspNetCore" Version="2.62.0" />-->
|
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.26.1"/>
|
|
||||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.62.0"/>
|
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.63.0">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.5.0"/>
|
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
|
<PackageReference Include="Google.Protobuf" Version="3.28.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0"/>
|
<PackageReference Include="Grpc" Version="2.46.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0"/>
|
<PackageReference Include="Grpc.Net.Client" Version="2.62.0" />
|
||||||
|
<PackageReference Include="Grpc.Tools" Version="2.66.0" PrivateAssets="All" />
|
||||||
|
|
||||||
<PackageReference Include="MorseCode.ITask" Version="2.0.3"/>
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.5.0" />
|
||||||
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0"/>
|
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||||
|
|
||||||
|
<PackageReference Include="MorseCode.ITask" Version="2.0.3" />
|
||||||
|
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
|
||||||
|
|
||||||
<!-- DI -->
|
<!-- DI -->
|
||||||
<!-- <PackageReference Include="Ninject" Version="3.3.6"/>-->
|
<!-- <PackageReference Include="Ninject" Version="3.3.6"/>-->
|
||||||
<!-- <PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0"/>-->
|
<!-- <PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0"/>-->
|
||||||
<!-- <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />-->
|
<!-- <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />-->
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1"/>
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
|
||||||
<PackageReference Include="DryIoc.dll" Version="5.4.3"/>
|
<PackageReference Include="DryIoc.dll" Version="5.4.3" />
|
||||||
<!-- <PackageReference Include="Scrutor" Version="4.2.0" />-->
|
<!-- <PackageReference Include="Scrutor" Version="4.2.0" />-->
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0"/>
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0"/>
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0"/>
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2"/>
|
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="NonBlocking" Version="2.1.2"/>
|
<PackageReference Include="NonBlocking" Version="2.1.2" />
|
||||||
<PackageReference Include="OneOf" Version="3.0.263"/>
|
<PackageReference Include="OneOf" Version="3.0.263" />
|
||||||
<PackageReference Include="OneOf.SourceGenerator" Version="3.0.263"/>
|
<PackageReference Include="OneOf.SourceGenerator" Version="3.0.263" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1"/>
|
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.1"/>
|
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.1" />
|
||||||
|
|
||||||
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta17"/>
|
<PackageReference Include="SixLabors.Fonts" Version="2.0.4" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.8"/>
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta14"/>
|
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.4" />
|
||||||
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009"/>
|
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009" />
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.7.33"/>
|
<PackageReference Include="StackExchange.Redis" Version="2.8.0" />
|
||||||
<PackageReference Include="YamlDotNet" Version="15.1.4"/>
|
<PackageReference Include="YamlDotNet" Version="15.1.4" />
|
||||||
<PackageReference Include="SharpToken" Version="2.0.3" />
|
<PackageReference Include="SharpToken" Version="2.0.3" />
|
||||||
|
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0"/>
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Db-related packages -->
|
<!-- Db-related packages -->
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4"/>
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
<PackageReference Include="linq2db.EntityFrameworkCore" Version="8.1.0"/>
|
<PackageReference Include="linq2db.EntityFrameworkCore" Version="8.1.0" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4"/>
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.8" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4"/>
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2"/>
|
|
||||||
|
|
||||||
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3"/>
|
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
|
||||||
|
|
||||||
<!-- Used by stream notifications -->
|
<!-- Used by stream notifications -->
|
||||||
<PackageReference Include="TwitchLib.Api" Version="3.4.1"/>
|
<PackageReference Include="TwitchLib.Api" Version="3.4.1" />
|
||||||
|
|
||||||
<!-- sqlselectcsv and stock -->
|
<!-- sqlselectcsv and stock -->
|
||||||
<PackageReference Include="CsvHelper" Version="32.0.3"/>
|
<PackageReference Include="CsvHelper" Version="32.0.3" />
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\EllieBot.GrpcApiBase\EllieBot.GrpcApiBase.csproj" />
|
||||||
<ProjectReference Include="..\Ellie.Marmalade\Ellie.Marmalade.csproj" />
|
<ProjectReference Include="..\Ellie.Marmalade\Ellie.Marmalade.csproj" />
|
||||||
<ProjectReference Include="..\EllieBot.Voice\EllieBot.Voice.csproj" />
|
<ProjectReference Include="..\EllieBot.Voice\EllieBot.Voice.csproj" />
|
||||||
<ProjectReference Include="..\EllieBot.Generators\EllieBot.Generators.csproj" OutputItemType="Analyzer" />
|
<ProjectReference Include="..\EllieBot.Generators\EllieBot.Generators.csproj" OutputItemType="Analyzer" />
|
||||||
|
@ -114,9 +113,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Protobuf Include="..\EllieBot.Coordinator\Protos\coordinator.proto" GrpcServices="Client">
|
|
||||||
<Link>Protos\coordinator.proto</Link>
|
|
||||||
</Protobuf>
|
|
||||||
<None Update="data\**\*">
|
<None Update="data\**\*">
|
||||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
@ -131,6 +127,13 @@
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Protobuf Include="..\EllieBot.Coordinator\Protos\coordinator.proto">
|
||||||
|
<Link>_common\CoordinatorProtos\coordinator.proto</Link>
|
||||||
|
<!-- <GrpcServices>Client</GrpcServices>-->
|
||||||
|
</Protobuf>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'GlobalEllie' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'GlobalEllie' ">
|
||||||
<!-- Define trace doesn't seem to affect the build at all so I had to remove $(DefineConstants)-->
|
<!-- Define trace doesn't seem to affect the build at all so I had to remove $(DefineConstants)-->
|
||||||
<DefineTrace>false</DefineTrace>
|
<DefineTrace>false</DefineTrace>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using EllieBot.Db.Models;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations;
|
namespace EllieBot.Migrations;
|
||||||
|
|
||||||
|
@ -8,16 +7,7 @@ public static class MigrationQueries
|
||||||
{
|
{
|
||||||
public static void MigrateRero(MigrationBuilder migrationBuilder)
|
public static void MigrateRero(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
if (migrationBuilder.IsMySql())
|
if (migrationBuilder.IsSqlite())
|
||||||
{
|
|
||||||
migrationBuilder.Sql(
|
|
||||||
@"INSERT IGNORE into reactionroles(guildid, channelid, messageid, emote, roleid, `group`, levelreq, dateadded)
|
|
||||||
select guildid, channelid, messageid, emotename, roleid, exclusive, 0, reactionrolemessage.dateadded
|
|
||||||
from reactionrole
|
|
||||||
left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid
|
|
||||||
left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;");
|
|
||||||
}
|
|
||||||
else if (migrationBuilder.IsSqlite())
|
|
||||||
{
|
{
|
||||||
migrationBuilder.Sql(
|
migrationBuilder.Sql(
|
||||||
@"insert or ignore into reactionroles(guildid, channelid, messageid, emote, roleid, 'group', levelreq, dateadded)
|
@"insert or ignore into reactionroles(guildid, channelid, messageid, emote, roleid, 'group', levelreq, dateadded)
|
||||||
|
@ -28,7 +18,8 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;")
|
||||||
}
|
}
|
||||||
else if (migrationBuilder.IsNpgsql())
|
else if (migrationBuilder.IsNpgsql())
|
||||||
{
|
{
|
||||||
migrationBuilder.Sql(@"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded)
|
migrationBuilder.Sql(
|
||||||
|
@"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded)
|
||||||
select guildid, channelid, messageid, emotename, roleid, exclusive::int, 0, reactionrolemessage.dateadded
|
select guildid, channelid, messageid, emotename, roleid, exclusive::int, 0, reactionrolemessage.dateadded
|
||||||
from reactionrole
|
from reactionrole
|
||||||
left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid
|
left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid
|
||||||
|
@ -44,11 +35,34 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;")
|
||||||
public static void GuildConfigCleanup(MigrationBuilder builder)
|
public static void GuildConfigCleanup(MigrationBuilder builder)
|
||||||
{
|
{
|
||||||
builder.Sql($"""
|
builder.Sql($"""
|
||||||
|
DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL;
|
||||||
|
DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs");
|
||||||
DELETE FROM "StreamRoleBlacklistedUser" WHERE "StreamRoleSettingsId" is NULL;
|
DELETE FROM "StreamRoleBlacklistedUser" WHERE "StreamRoleSettingsId" is NULL;
|
||||||
""");
|
""");
|
||||||
|
}
|
||||||
|
|
||||||
builder.Sql($"""
|
public static void GreetSettingsCopy(MigrationBuilder builder)
|
||||||
DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL;
|
{
|
||||||
|
builder.Sql("""
|
||||||
|
INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer)
|
||||||
|
SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer
|
||||||
|
FROM GuildConfigs
|
||||||
|
WHERE SendChannelGreetMessage = TRUE;
|
||||||
|
|
||||||
|
INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer)
|
||||||
|
SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0
|
||||||
|
FROM GuildConfigs
|
||||||
|
WHERE SendDmGreetMessage = TRUE;
|
||||||
|
|
||||||
|
INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer)
|
||||||
|
SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer
|
||||||
|
FROM GuildConfigs
|
||||||
|
WHERE SendChannelByeMessage = TRUE;
|
||||||
|
|
||||||
|
INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer)
|
||||||
|
SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter
|
||||||
|
FROM GuildConfigs
|
||||||
|
WHERE SendBoostMessage = TRUE;
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class stondel : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "deletestreamonlinemessage",
|
|
||||||
table: "guildconfigs",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "deletestreamonlinemessage",
|
|
||||||
table: "guildconfigs");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,42 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class bank : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "bankusers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
balance = table.Column<long>(type: "bigint", nullable: false),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_bankusers", x => x.id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_bankusers_userid",
|
|
||||||
table: "bankusers",
|
|
||||||
column: "userid",
|
|
||||||
unique: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "bankusers");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,121 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class newrero : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "reactionroles",
|
|
||||||
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),
|
|
||||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
emote = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
roleid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
group = table.Column<int>(type: "int", nullable: false),
|
|
||||||
levelreq = table.Column<int>(type: "int", nullable: false),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_reactionroles", x => x.id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_reactionroles_guildid",
|
|
||||||
table: "reactionroles",
|
|
||||||
column: "guildid");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_reactionroles_messageid_emote",
|
|
||||||
table: "reactionroles",
|
|
||||||
columns: new[] { "messageid", "emote" },
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
MigrationQueries.MigrateRero(migrationBuilder);
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "reactionrole");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "reactionrolemessage");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "reactionroles");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "reactionrolemessage",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
guildconfigid = table.Column<int>(type: "int", nullable: false),
|
|
||||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
exclusive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
index = table.Column<int>(type: "int", nullable: false),
|
|
||||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_reactionrolemessage", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "fk_reactionrolemessage_guildconfigs_guildconfigid",
|
|
||||||
column: x => x.guildconfigid,
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "reactionrole",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
emotename = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
reactionrolemessageid = table.Column<int>(type: "int", nullable: true),
|
|
||||||
roleid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_reactionrole", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid",
|
|
||||||
column: x => x.reactionrolemessageid,
|
|
||||||
principalTable: "reactionrolemessage",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_reactionrole_reactionrolemessageid",
|
|
||||||
table: "reactionrole",
|
|
||||||
column: "reactionrolemessageid");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_reactionrolemessage_guildconfigid",
|
|
||||||
table: "reactionrolemessage",
|
|
||||||
column: "guildconfigid");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,176 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class patronagesystem : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "patreonuserid",
|
|
||||||
table: "rewardedusers",
|
|
||||||
newName: "platformuserid");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "ix_rewardedusers_patreonuserid",
|
|
||||||
table: "rewardedusers",
|
|
||||||
newName: "ix_rewardedusers_platformuserid");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "xp",
|
|
||||||
table: "userxpstats",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "awardedxp",
|
|
||||||
table: "userxpstats",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "amountrewardedthismonth",
|
|
||||||
table: "rewardedusers",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "verboseerrors",
|
|
||||||
table: "guildconfigs",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: true,
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "totalxp",
|
|
||||||
table: "discorduser",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0L,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldDefaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "patronquotas",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
featuretype = table.Column<int>(type: "int", nullable: false),
|
|
||||||
feature = table.Column<string>(type: "varchar(255)", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
hourlycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
|
||||||
dailycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
|
||||||
monthlycount = table.Column<uint>(type: "int unsigned", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "patrons",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
uniqueplatformuserid = table.Column<string>(type: "varchar(255)", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
amountcents = table.Column<int>(type: "int", nullable: false),
|
|
||||||
lastcharge = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
validthru = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_patrons", x => x.userid);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_patronquotas_userid",
|
|
||||||
table: "patronquotas",
|
|
||||||
column: "userid");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_patrons_uniqueplatformuserid",
|
|
||||||
table: "patrons",
|
|
||||||
column: "uniqueplatformuserid",
|
|
||||||
unique: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "patronquotas");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "patrons");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "platformuserid",
|
|
||||||
table: "rewardedusers",
|
|
||||||
newName: "patreonuserid");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "ix_rewardedusers_platformuserid",
|
|
||||||
table: "rewardedusers",
|
|
||||||
newName: "ix_rewardedusers_patreonuserid");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "xp",
|
|
||||||
table: "userxpstats",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "awardedxp",
|
|
||||||
table: "userxpstats",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "amountrewardedthismonth",
|
|
||||||
table: "rewardedusers",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "verboseerrors",
|
|
||||||
table: "guildconfigs",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldDefaultValue: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "totalxp",
|
|
||||||
table: "discorduser",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint",
|
|
||||||
oldDefaultValue: 0L);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,39 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class stondeldbcache : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "streamonlinemessages",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
type = table.Column<int>(type: "int", nullable: false),
|
|
||||||
name = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_streamonlinemessages", x => x.id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "streamonlinemessages");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class logwarns : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<ulong>(
|
|
||||||
name: "logwarnsid",
|
|
||||||
table: "logsettings",
|
|
||||||
type: "bigint unsigned",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "logwarnsid",
|
|
||||||
table: "logsettings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,45 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class xpitemshop : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "xpshopowneditem",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
itemtype = table.Column<int>(type: "int", nullable: false),
|
|
||||||
isusing = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
itemkey = table.Column<string>(type: "varchar(255)", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_xpshopowneditem", x => x.id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_xpshopowneditem_userid_itemtype_itemkey",
|
|
||||||
table: "xpshopowneditem",
|
|
||||||
columns: new[] { "userid", "itemtype", "itemkey" },
|
|
||||||
unique: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "xpshopowneditem");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class linkonlychannels : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "type",
|
|
||||||
table: "imageonlychannels",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "type",
|
|
||||||
table: "imageonlychannels");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,49 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class removeobsoletexpcolumns : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "lastlevelup",
|
|
||||||
table: "userxpstats");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "lastlevelup",
|
|
||||||
table: "discorduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "lastxpgain",
|
|
||||||
table: "discorduser");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "lastlevelup",
|
|
||||||
table: "userxpstats",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValueSql: "(UTC_TIMESTAMP)");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "lastlevelup",
|
|
||||||
table: "discorduser",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValueSql: "(UTC_TIMESTAMP)");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "lastxpgain",
|
|
||||||
table: "discorduser",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class banprune : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "prunedays",
|
|
||||||
table: "bantemplates",
|
|
||||||
type: "int",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "prunedays",
|
|
||||||
table: "bantemplates");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class shoprolereq : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<ulong>(
|
|
||||||
name: "rolerequirement",
|
|
||||||
table: "shopentry",
|
|
||||||
type: "bigint unsigned",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "rolerequirement",
|
|
||||||
table: "shopentry");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,42 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class autopub : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "autopublishchannel",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_autopublishchannel", x => x.id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_autopublishchannel_guildid",
|
|
||||||
table: "autopublishchannel",
|
|
||||||
column: "guildid",
|
|
||||||
unique: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "autopublishchannel");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,44 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,35 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class logthread : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<ulong>(
|
|
||||||
name: "threadcreatedid",
|
|
||||||
table: "logsettings",
|
|
||||||
type: "bigint unsigned",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<ulong>(
|
|
||||||
name: "threaddeletedid",
|
|
||||||
table: "logsettings",
|
|
||||||
type: "bigint unsigned",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "threadcreatedid",
|
|
||||||
table: "logsettings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "threaddeletedid",
|
|
||||||
table: "logsettings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
public partial class feedtext : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "message",
|
|
||||||
table: "feedsub",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "message",
|
|
||||||
table: "feedsub");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
3830
src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs
generated
3830
src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs
generated
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,703 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class guidlconfigcleanup : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antiraidsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antiraidsetting");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antispamignore_antispamsetting_antispamsettingid",
|
|
||||||
table: "antispamignore");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antispamsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antispamsetting");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_commandalias_guildconfigs_guildconfigid",
|
|
||||||
table: "commandalias");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_commandcooldown_guildconfigs_guildconfigid",
|
|
||||||
table: "commandcooldown");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_excludeditem_xpsettings_xpsettingsid",
|
|
||||||
table: "excludeditem");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterchannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filteredword_guildconfigs_guildconfigid",
|
|
||||||
table: "filteredword");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterlinkschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterlinkschannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterwordschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterwordschannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_followedstream_guildconfigs_guildconfigid",
|
|
||||||
table: "followedstream");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_gcchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "gcchannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_muteduserid_guildconfigs_guildconfigid",
|
|
||||||
table: "muteduserid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_permissions_guildconfigs_guildconfigid",
|
|
||||||
table: "permissions");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_shopentry_guildconfigs_guildconfigid",
|
|
||||||
table: "shopentry");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_shopentryitem_shopentry_shopentryid",
|
|
||||||
table: "shopentryitem");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoredrole");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoreduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamroleblacklisteduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamrolewhitelisteduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unbantimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unbantimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unmutetimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unmutetimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unroletimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unroletimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_vcroleinfo_guildconfigs_guildconfigid",
|
|
||||||
table: "vcroleinfo");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_warningpunishment_guildconfigs_guildconfigid",
|
|
||||||
table: "warningpunishment");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ignoredvoicepresencechannels");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "streamrolesettingsid",
|
|
||||||
table: "streamrolewhitelisteduser",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "streamrolesettingsid",
|
|
||||||
table: "streamroleblacklisteduser",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antiraidsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antiraidsetting",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antispamignore_antispamsetting_antispamsettingid",
|
|
||||||
table: "antispamignore",
|
|
||||||
column: "antispamsettingid",
|
|
||||||
principalTable: "antispamsetting",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antispamsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antispamsetting",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_commandalias_guildconfigs_guildconfigid",
|
|
||||||
table: "commandalias",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_commandcooldown_guildconfigs_guildconfigid",
|
|
||||||
table: "commandcooldown",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_excludeditem_xpsettings_xpsettingsid",
|
|
||||||
table: "excludeditem",
|
|
||||||
column: "xpsettingsid",
|
|
||||||
principalTable: "xpsettings",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterchannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filteredword_guildconfigs_guildconfigid",
|
|
||||||
table: "filteredword",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterlinkschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterlinkschannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterwordschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterwordschannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_followedstream_guildconfigs_guildconfigid",
|
|
||||||
table: "followedstream",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_gcchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "gcchannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_muteduserid_guildconfigs_guildconfigid",
|
|
||||||
table: "muteduserid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_permissions_guildconfigs_guildconfigid",
|
|
||||||
table: "permissions",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_shopentry_guildconfigs_guildconfigid",
|
|
||||||
table: "shopentry",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_shopentryitem_shopentry_shopentryid",
|
|
||||||
table: "shopentryitem",
|
|
||||||
column: "shopentryid",
|
|
||||||
principalTable: "shopentry",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoredrole",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoreduser",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamroleblacklisteduser",
|
|
||||||
column: "streamrolesettingsid",
|
|
||||||
principalTable: "streamrolesettings",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamrolewhitelisteduser",
|
|
||||||
column: "streamrolesettingsid",
|
|
||||||
principalTable: "streamrolesettings",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unbantimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unbantimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unmutetimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unmutetimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unroletimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unroletimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_vcroleinfo_guildconfigs_guildconfigid",
|
|
||||||
table: "vcroleinfo",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_warningpunishment_guildconfigs_guildconfigid",
|
|
||||||
table: "warningpunishment",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antiraidsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antiraidsetting");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antispamignore_antispamsetting_antispamsettingid",
|
|
||||||
table: "antispamignore");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_antispamsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antispamsetting");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_commandalias_guildconfigs_guildconfigid",
|
|
||||||
table: "commandalias");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_commandcooldown_guildconfigs_guildconfigid",
|
|
||||||
table: "commandcooldown");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_excludeditem_xpsettings_xpsettingsid",
|
|
||||||
table: "excludeditem");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterchannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filteredword_guildconfigs_guildconfigid",
|
|
||||||
table: "filteredword");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterlinkschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterlinkschannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_filterwordschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterwordschannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_followedstream_guildconfigs_guildconfigid",
|
|
||||||
table: "followedstream");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_gcchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "gcchannelid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_muteduserid_guildconfigs_guildconfigid",
|
|
||||||
table: "muteduserid");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_permissions_guildconfigs_guildconfigid",
|
|
||||||
table: "permissions");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_shopentry_guildconfigs_guildconfigid",
|
|
||||||
table: "shopentry");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_shopentryitem_shopentry_shopentryid",
|
|
||||||
table: "shopentryitem");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoredrole");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoreduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamroleblacklisteduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamrolewhitelisteduser");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unbantimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unbantimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unmutetimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unmutetimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_unroletimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unroletimer");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_vcroleinfo_guildconfigs_guildconfigid",
|
|
||||||
table: "vcroleinfo");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "fk_warningpunishment_guildconfigs_guildconfigid",
|
|
||||||
table: "warningpunishment");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "streamrolesettingsid",
|
|
||||||
table: "streamrolewhitelisteduser",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "streamrolesettingsid",
|
|
||||||
table: "streamroleblacklisteduser",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ignoredvoicepresencechannels",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
logsettingid = table.Column<int>(type: "int", nullable: true),
|
|
||||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid",
|
|
||||||
column: x => x.logsettingid,
|
|
||||||
principalTable: "logsettings",
|
|
||||||
principalColumn: "id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_ignoredvoicepresencechannels_logsettingid",
|
|
||||||
table: "ignoredvoicepresencechannels",
|
|
||||||
column: "logsettingid");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antiraidsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antiraidsetting",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antispamignore_antispamsetting_antispamsettingid",
|
|
||||||
table: "antispamignore",
|
|
||||||
column: "antispamsettingid",
|
|
||||||
principalTable: "antispamsetting",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_antispamsetting_guildconfigs_guildconfigid",
|
|
||||||
table: "antispamsetting",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_commandalias_guildconfigs_guildconfigid",
|
|
||||||
table: "commandalias",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_commandcooldown_guildconfigs_guildconfigid",
|
|
||||||
table: "commandcooldown",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid",
|
|
||||||
table: "delmsgoncmdchannel",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_excludeditem_xpsettings_xpsettingsid",
|
|
||||||
table: "excludeditem",
|
|
||||||
column: "xpsettingsid",
|
|
||||||
principalTable: "xpsettings",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterchannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filteredword_guildconfigs_guildconfigid",
|
|
||||||
table: "filteredword",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterlinkschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterlinkschannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_filterwordschannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "filterwordschannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_followedstream_guildconfigs_guildconfigid",
|
|
||||||
table: "followedstream",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_gcchannelid_guildconfigs_guildconfigid",
|
|
||||||
table: "gcchannelid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_muteduserid_guildconfigs_guildconfigid",
|
|
||||||
table: "muteduserid",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_permissions_guildconfigs_guildconfigid",
|
|
||||||
table: "permissions",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_shopentry_guildconfigs_guildconfigid",
|
|
||||||
table: "shopentry",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_shopentryitem_shopentry_shopentryid",
|
|
||||||
table: "shopentryitem",
|
|
||||||
column: "shopentryid",
|
|
||||||
principalTable: "shopentry",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoredrole",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid",
|
|
||||||
table: "slowmodeignoreduser",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamroleblacklisteduser",
|
|
||||||
column: "streamrolesettingsid",
|
|
||||||
principalTable: "streamrolesettings",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~",
|
|
||||||
table: "streamrolewhitelisteduser",
|
|
||||||
column: "streamrolesettingsid",
|
|
||||||
principalTable: "streamrolesettings",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unbantimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unbantimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unmutetimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unmutetimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_unroletimer_guildconfigs_guildconfigid",
|
|
||||||
table: "unroletimer",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_vcroleinfo_guildconfigs_guildconfigid",
|
|
||||||
table: "vcroleinfo",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "fk_warningpunishment_guildconfigs_guildconfigid",
|
|
||||||
table: "warningpunishment",
|
|
||||||
column: "guildconfigid",
|
|
||||||
principalTable: "guildconfigs",
|
|
||||||
principalColumn: "id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations.Mysql
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class removepatronlimits : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "patronquotas");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "patronquotas",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
||||||
featuretype = table.Column<int>(type: "int", nullable: false),
|
|
||||||
feature = table.Column<string>(type: "varchar(255)", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
dailycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
|
||||||
hourlycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
|
||||||
monthlycount = table.Column<uint>(type: "int unsigned", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "ix_patronquotas_userid",
|
|
||||||
table: "patronquotas",
|
|
||||||
column: "userid");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
@ -10,12 +9,6 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AddColumn<decimal>(
|
|
||||||
name: "rolerequirement",
|
|
||||||
table: "shopentry",
|
|
||||||
type: "numeric(20,0)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "autopublishchannel",
|
name: "autopublishchannel",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
@ -42,10 +35,6 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "autopublishchannel");
|
name: "autopublishchannel");
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "rolerequirement",
|
|
||||||
table: "shopentry");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,33 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace EllieBot.Migrations.PostgreSql
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class honeypot : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "honeypotchannels",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||||
|
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("pk_honeypotchannels", x => x.guildid);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "honeypotchannels");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,199 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace EllieBot.Migrations.PostgreSql
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class greetsettings : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "greetsettings",
|
||||||
|
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),
|
||||||
|
greettype = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
messagetext = table.Column<string>(type: "text", nullable: true),
|
||||||
|
isenabled = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
|
||||||
|
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: true),
|
||||||
|
autodeletetimer = table.Column<int>(type: "integer", nullable: false, defaultValue: 0)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("pk_greetsettings", x => x.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "ix_greetsettings_guildid_greettype",
|
||||||
|
table: "greetsettings",
|
||||||
|
columns: new[] { "guildid", "greettype" },
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
MigrationQueries.GreetSettingsCopy(migrationBuilder);
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "autodeletebyemessagestimer",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "autodeletegreetmessagestimer",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "boostmessage",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "boostmessagechannelid",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "boostmessagedeleteafter",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "byemessagechannelid",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "channelbyemessagetext",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "channelgreetmessagetext",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "dmgreetmessagetext",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "greetmessagechannelid",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "sendboostmessage",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "sendchannelbyemessage",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "sendchannelgreetmessage",
|
||||||
|
table: "guildconfigs");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "senddmgreetmessage",
|
||||||
|
table: "guildconfigs");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "greetsettings");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "autodeletebyemessagestimer",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "autodeletegreetmessagestimer",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "boostmessage",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "boostmessagechannelid",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "numeric(20,0)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0m);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "boostmessagedeleteafter",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "byemessagechannelid",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "numeric(20,0)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0m);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "channelbyemessagetext",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "channelgreetmessagetext",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "dmgreetmessagetext",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "greetmessagechannelid",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "numeric(20,0)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0m);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "sendboostmessage",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "sendchannelbyemessage",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "sendchannelgreetmessage",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "senddmgreetmessage",
|
||||||
|
table: "guildconfigs",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,7 +17,7 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "8.0.4")
|
.HasAnnotation("ProductVersion", "8.0.8")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
@ -1220,42 +1220,10 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("autoassignroleids");
|
.HasColumnName("autoassignroleids");
|
||||||
|
|
||||||
b.Property<int>("AutoDeleteByeMessagesTimer")
|
|
||||||
.HasColumnType("integer")
|
|
||||||
.HasColumnName("autodeletebyemessagestimer");
|
|
||||||
|
|
||||||
b.Property<int>("AutoDeleteGreetMessagesTimer")
|
|
||||||
.HasColumnType("integer")
|
|
||||||
.HasColumnName("autodeletegreetmessagestimer");
|
|
||||||
|
|
||||||
b.Property<bool>("AutoDeleteSelfAssignedRoleMessages")
|
b.Property<bool>("AutoDeleteSelfAssignedRoleMessages")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("autodeleteselfassignedrolemessages");
|
.HasColumnName("autodeleteselfassignedrolemessages");
|
||||||
|
|
||||||
b.Property<string>("BoostMessage")
|
|
||||||
.HasColumnType("text")
|
|
||||||
.HasColumnName("boostmessage");
|
|
||||||
|
|
||||||
b.Property<decimal>("BoostMessageChannelId")
|
|
||||||
.HasColumnType("numeric(20,0)")
|
|
||||||
.HasColumnName("boostmessagechannelid");
|
|
||||||
|
|
||||||
b.Property<int>("BoostMessageDeleteAfter")
|
|
||||||
.HasColumnType("integer")
|
|
||||||
.HasColumnName("boostmessagedeleteafter");
|
|
||||||
|
|
||||||
b.Property<decimal>("ByeMessageChannelId")
|
|
||||||
.HasColumnType("numeric(20,0)")
|
|
||||||
.HasColumnName("byemessagechannelid");
|
|
||||||
|
|
||||||
b.Property<string>("ChannelByeMessageText")
|
|
||||||
.HasColumnType("text")
|
|
||||||
.HasColumnName("channelbyemessagetext");
|
|
||||||
|
|
||||||
b.Property<string>("ChannelGreetMessageText")
|
|
||||||
.HasColumnType("text")
|
|
||||||
.HasColumnName("channelgreetmessagetext");
|
|
||||||
|
|
||||||
b.Property<bool>("CleverbotEnabled")
|
b.Property<bool>("CleverbotEnabled")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("cleverbotenabled");
|
.HasColumnName("cleverbotenabled");
|
||||||
|
@ -1276,10 +1244,6 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("disableglobalexpressions");
|
.HasColumnName("disableglobalexpressions");
|
||||||
|
|
||||||
b.Property<string>("DmGreetMessageText")
|
|
||||||
.HasColumnType("text")
|
|
||||||
.HasColumnName("dmgreetmessagetext");
|
|
||||||
|
|
||||||
b.Property<bool>("ExclusiveSelfAssignedRoles")
|
b.Property<bool>("ExclusiveSelfAssignedRoles")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("exclusiveselfassignedroles");
|
.HasColumnName("exclusiveselfassignedroles");
|
||||||
|
@ -1300,10 +1264,6 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
.HasColumnType("numeric(20,0)")
|
.HasColumnType("numeric(20,0)")
|
||||||
.HasColumnName("gamevoicechannel");
|
.HasColumnName("gamevoicechannel");
|
||||||
|
|
||||||
b.Property<decimal>("GreetMessageChannelId")
|
|
||||||
.HasColumnType("numeric(20,0)")
|
|
||||||
.HasColumnName("greetmessagechannelid");
|
|
||||||
|
|
||||||
b.Property<decimal>("GuildId")
|
b.Property<decimal>("GuildId")
|
||||||
.HasColumnType("numeric(20,0)")
|
.HasColumnType("numeric(20,0)")
|
||||||
.HasColumnName("guildid");
|
.HasColumnName("guildid");
|
||||||
|
@ -1328,22 +1288,6 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("prefix");
|
.HasColumnName("prefix");
|
||||||
|
|
||||||
b.Property<bool>("SendBoostMessage")
|
|
||||||
.HasColumnType("boolean")
|
|
||||||
.HasColumnName("sendboostmessage");
|
|
||||||
|
|
||||||
b.Property<bool>("SendChannelByeMessage")
|
|
||||||
.HasColumnType("boolean")
|
|
||||||
.HasColumnName("sendchannelbyemessage");
|
|
||||||
|
|
||||||
b.Property<bool>("SendChannelGreetMessage")
|
|
||||||
.HasColumnType("boolean")
|
|
||||||
.HasColumnName("sendchannelgreetmessage");
|
|
||||||
|
|
||||||
b.Property<bool>("SendDmGreetMessage")
|
|
||||||
.HasColumnType("boolean")
|
|
||||||
.HasColumnName("senddmgreetmessage");
|
|
||||||
|
|
||||||
b.Property<bool>("StickyRoles")
|
b.Property<bool>("StickyRoles")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("stickyroles");
|
.HasColumnName("stickyroles");
|
||||||
|
@ -1387,6 +1331,23 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
b.ToTable("guildconfigs", (string)null);
|
b.ToTable("guildconfigs", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b =>
|
||||||
|
{
|
||||||
|
b.Property<decimal>("GuildId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("numeric(20,0)")
|
||||||
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
|
b.Property<decimal>("ChannelId")
|
||||||
|
.HasColumnType("numeric(20,0)")
|
||||||
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
|
b.HasKey("GuildId")
|
||||||
|
.HasName("pk_honeypotchannels");
|
||||||
|
|
||||||
|
b.ToTable("honeypotchannels", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b =>
|
modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
|
@ -3146,6 +3107,53 @@ namespace EllieBot.Migrations.PostgreSql
|
||||||
b.ToTable("xpshopowneditem", (string)null);
|
b.ToTable("xpshopowneditem", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EllieBot.Services.GreetSettings", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("AutoDeleteTimer")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasDefaultValue(0)
|
||||||
|
.HasColumnName("autodeletetimer");
|
||||||
|
|
||||||
|
b.Property<decimal?>("ChannelId")
|
||||||
|
.HasColumnType("numeric(20,0)")
|
||||||
|
.HasColumnName("channelid");
|
||||||
|
|
||||||
|
b.Property<int>("GreetType")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("greettype");
|
||||||
|
|
||||||
|
b.Property<decimal>("GuildId")
|
||||||
|
.HasColumnType("numeric(20,0)")
|
||||||
|
.HasColumnName("guildid");
|
||||||
|
|
||||||
|
b.Property<bool>("IsEnabled")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("isenabled");
|
||||||
|
|
||||||
|
b.Property<string>("MessageText")
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("messagetext");
|
||||||
|
|
||||||
|
b.HasKey("Id")
|
||||||
|
.HasName("pk_greetsettings");
|
||||||
|
|
||||||
|
b.HasIndex("GuildId", "GreetType")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("ix_greetsettings_guildid_greettype");
|
||||||
|
|
||||||
|
b.ToTable("greetsettings", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b =>
|
modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("EllieBot.Db.Models.GuildConfig", null)
|
b.HasOne("EllieBot.Db.Models.GuildConfig", null)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations
|
namespace EllieBot.Migrations
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations
|
namespace EllieBot.Migrations
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations
|
namespace EllieBot.Migrations
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations
|
namespace EllieBot.Migrations
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace EllieBot.Migrations
|
namespace EllieBot.Migrations
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue