diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f353ca95..bb9de9696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,15 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o -## [5.0.0] - ??.??.???? +## [4.3.14] - 02.04.2023 -- Big internal changes +### Fixed +- Fixed voice hearbeat issue +- `.banktake` had ok/error responses flipped. No functional change +- PermRole should deny messages in threads todo +- Fixed chucknorris jokes +- `.logserver` will now ## [4.3.13] - 20.02.2023 @@ -21,7 +26,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog. - Fixed `.betstats` not working on european locales - Timed `.ban` will work on users who are not in the server -- Fixed some bugs in the medusa system +- Fixed some bugs in the medusa system ## [4.3.11] - 21.01.2023 @@ -57,7 +62,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog. ## [4.3.10] - 10.11.2022 -### Added +### Added - `.filterlist` / `.fl` command which lists link and invite filtering channels and status - Added support for `%target%` placeholder in `.alias` command @@ -66,13 +71,13 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog. ### Changed -- .meload and .meunload are now case sensitive. Previously loaded medusae may need to be reloaded or data/medusae/medusa.yml may need to be edited manually +- .meload and .meunload are now case sensitive. Previously loaded medusae may need to be reloaded or data/medusae/medusa.yml may need to be edited manually - Several club related command have their error messages improved - Updated help text for .antispam and .antiraid - You can now specify time and date (time is optional) in `.remind` command instead of relative time, in the format `HH:mm dd.MM.YYYY` -- OwnerId will be automatically added to `creds.yml` at bot startup if it's missing +- OwnerId will be automatically added to `creds.yml` at bot startup if it's missing -### Fixed +### Fixed - Fixed `.cmdcd` console error - Fixed an error when currency is add per xp @@ -84,7 +89,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog. ## [4.3.9] - 12.10.2022 -### Added +### Added - `.betstats` shows sum of all bets, payouts and the payout rate in %. Updates once an hour diff --git a/docs/guides/windows-guide.md b/docs/guides/windows-guide.md index 00cf52222..03ad5c876 100644 --- a/docs/guides/windows-guide.md +++ b/docs/guides/windows-guide.md @@ -43,7 +43,7 @@ #### Updating Nadeko -- Make sure Nadeko is closed and not running +- Make sure Nadeko is closed and not running (Run `.die` in a connected server to ensure it's not running). - Open NadekoBot Updater - Click on your bot at the upper left (looks like a spy). @@ -73,7 +73,7 @@ You can still install them manually: ##### Installation Instructions -Open PowerShell (press windows button on your keyboard and type powershell, it should show up; alternatively, right click the start menu and select Windows PowerShell), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`) +Open PowerShell (press windows button on your keyboard and type powershell, it should show up; alternatively, right click the start menu and select Windows PowerShell), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`) 1. `git clone https://gitlab.com/kwoth/nadekobot -b v5 --depth 1` 2. `cd nadekobot` @@ -82,7 +82,7 @@ Open PowerShell (press windows button on your keyboard and type powershell, it s 5. `cp creds_example.yml creds.yml` 6. Open `creds.yml` with your favorite text editor (Please don't use Notepad or WordPad. You can use Notepad++, VSCode, Atom, Sublime, or something similar) 7. [Enter your bot's token](#creds-guide) -8. Run the bot `dotnet NadekoBot.dll` +8. Run the bot `dotnet NadekoBot.dll` 9. 🎉 ##### Update Instructions @@ -100,7 +100,7 @@ Open PowerShell as described above and run the following commands: - `cp -r -fo output/ output-old` 5. Build the bot again - `dotnet publish -c Release -o output/ src/NadekoBot/` -6. Remove old strings and aliases to avoid overwriting the updated versions of those files +6. Remove old strings and aliases to avoid overwriting the updated versions of those files - ⚠ If you've modified said files, back them up instead - `rm output-old/data/aliases.yml` - `rm -r output-old/data/strings` @@ -108,18 +108,20 @@ Open PowerShell as described above and run the following commands: - `cp -Recurse .\output-old\data\ .\output\ -Force` 8. Copy creds.yml - `cp output-old/creds.yml output/` -9. Run the bot +9. Run the bot - `cd output` - `dotnet NadekoBot.dll` 🎉 Enjoy -#### Music prerequisites +#### Music prerequisites In order to use music commands, you need ffmpeg and yt-dlp installed. - [ffmpeg-32bit] | [ffmpeg-64bit] - Download the **appropriate version** for your system (32 bit if you're running a 32 bit OS, or 64 if you're running a 64bit OS). Unzip it, and move `ffmpeg.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `ffmpeg.exe` file to `NadekoBot/output`. - [youtube-dlp] - Click to download the `yt-dlp.exe` file, then move `yt-dlp.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `yt-dlp.exe` file to `NadekoBot/system`. -[Updater]: https://dl.nadeko.bot/ +[Updater]: https://dl.nadeko.bot/v3/ +[Notepad++]: https://notepad-plus-plus.org/ +[.net]: https://dotnet.microsoft.com/download/dotnet/5.0 [Redis]: https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi [Visual C++ 2010 (x86)]: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe [Visual C++ 2017 (x64)]: https://aka.ms/vs/15/release/vc_redist.x64.exe diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs index 6a5836058..f3a9d9a6f 100644 --- a/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs @@ -92,14 +92,10 @@ public partial class Gambling { if (await _bank.AwardAsync(userId, amount)) { - await ReplyErrorLocalizedAsync(strs.take_fail(N(amount), - _client.GetUser(userId)?.ToString() - ?? userId.ToString(), - CurrencySign)); + await ctx.OkAsync(); return; } - - await ctx.OkAsync(); + } [Cmd] diff --git a/src/NadekoBot/data/strings/commands/commands.en-US.yml b/src/NadekoBot/data/strings/commands/commands.en-US.yml index 646530554..0639cddcd 100644 --- a/src/NadekoBot/data/strings/commands/commands.en-US.yml +++ b/src/NadekoBot/data/strings/commands/commands.en-US.yml @@ -1559,7 +1559,7 @@ timezones: args: - "" timezone: - desc: "Sets this guilds timezone. This affects bot's time output in this server (logs, etc..)" + desc: "Sets this guilds timezone. This affects bot's time output in this server (logs, etc..) **Setting timezone requires Administrator server permission.**" args: - "" - "GMT Standard Time" diff --git a/src/ayu/Ayu.Discord.Voice/VoiceGateway.cs b/src/ayu/Ayu.Discord.Voice/VoiceGateway.cs index 51d9b11a9..0b73793d5 100644 --- a/src/ayu/Ayu.Discord.Voice/VoiceGateway.cs +++ b/src/ayu/Ayu.Discord.Voice/VoiceGateway.cs @@ -237,20 +237,25 @@ namespace Ayu.Discord.Voice _udpEp = new(IPAddress.Parse(ready.Ip), ready.Port); var ssrcBytes = BitConverter.GetBytes(Ssrc); - var ipDiscoveryData = new byte[70]; - Buffer.BlockCopy(ssrcBytes, 0, ipDiscoveryData, 0, ssrcBytes.Length); + Array.Reverse(ssrcBytes); + var ipDiscoveryData = new byte[74]; + Buffer.BlockCopy(ssrcBytes, 0, ipDiscoveryData, 4, ssrcBytes.Length); + ipDiscoveryData[0] = 0x00; + ipDiscoveryData[1] = 0x01; + ipDiscoveryData[2] = 0x00; + ipDiscoveryData[3] = 0x46; await _udpClient.SendAsync(ipDiscoveryData, ipDiscoveryData.Length, _udpEp); while (true) { var buffer = _udpClient.Receive(ref _udpEp); - if (buffer.Length == 70) + if (buffer.Length == 74) { //Log.Information("Received IP discovery data."); - var myIp = Encoding.UTF8.GetString(buffer, 4, buffer.Length - 8); + var myIp = Encoding.UTF8.GetString(buffer, 8, buffer.Length - 10); MyIp = myIp.TrimEnd('\0'); - MyPort = BitConverter.ToUInt16(buffer, buffer.Length - 2); + MyPort = (ushort)((buffer[^2] << 8) | buffer[^1]); //Log.Information("{MyIp}:{MyPort}", MyIp, MyPort); @@ -367,4 +372,4 @@ namespace Ayu.Discord.Voice await complete.Task; } } -} +} \ No newline at end of file