From a9aea65134cf624f3a7f1fa6807ac69c182e1de4 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sun, 2 Apr 2023 20:37:12 +0200 Subject: [PATCH 1/4] Possible fix for voice issues, thanks to anonymous contributor --- src/ayu/Ayu.Discord.Voice/VoiceGateway.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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 From 37acdb81e87ab94fed39cd83f49b776f89d2a97d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sun, 2 Apr 2023 20:46:27 +0200 Subject: [PATCH 2/4] Updated CHANGELOG.md, upped version to 4.3.14 --- CHANGELOG.md | 22 +++++++++++++++------ src/NadekoBot/Services/Impl/StatsService.cs | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e97d776ef..bb9de9696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o +## [4.3.14] - 02.04.2023 + +### 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 ### Fixed @@ -16,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 @@ -52,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 @@ -61,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 @@ -79,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/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index e1371e5e5..e66af86df 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -7,7 +7,7 @@ namespace NadekoBot.Services; public sealed class StatsService : IStatsService, IReadyExecutor, INService { - public const string BOT_VERSION = "4.3.13"; + public const string BOT_VERSION = "4.3.14"; public string Author => "Kwoth#2452"; From b829ca0109bbada25ae8389c915c6c4618c2bef2 Mon Sep 17 00:00:00 2001 From: Kamal Tufekcic Date: Thu, 6 Apr 2023 00:40:02 +0000 Subject: [PATCH 3/4] fixed bank award giving error message instead of checkmark --- src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs b/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs index 9b6dbf611..042f6aa54 100644 --- a/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs +++ b/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs @@ -91,14 +91,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] From 26b7149435eddf4249e00dbcd3b6d9d2737f5167 Mon Sep 17 00:00:00 2001 From: Hokuto Chen Date: Thu, 6 Apr 2023 00:40:29 +0000 Subject: [PATCH 4/4] updated updater link --- docs/guides/windows-guide.md | 2 +- src/NadekoBot/data/strings/commands/commands.en-US.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/windows-guide.md b/docs/guides/windows-guide.md index 7392a1602..1b7cc575a 100644 --- a/docs/guides/windows-guide.md +++ b/docs/guides/windows-guide.md @@ -123,7 +123,7 @@ In order to use music commands, you need ffmpeg and youtube-dl 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-dl] - Click to download the file, then move `youtube-dl.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `youtube-dl.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 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"