Skip to content

Commit 5510f12

Browse files
LulalabyCopilotCopilot
committed
chore: rename Voice example
Rename the VoiceNext example folder, project, namespaces, and README references to match the modern DisCatSharp.Voice package naming. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 2157150 commit 5510f12

10 files changed

Lines changed: 63 additions & 27 deletions

DisCatSharp.Examples.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
<Project Path="Hosting/Hosting.csproj" />
99
<Project Path="Interactivity/Interactivity.csproj" />
1010
<Project Path="Lavalink/Lavalink.csproj" />
11-
<Project Path="VoiceNext/VoiceNext.csproj" />
11+
<Project Path="Voice/Voice.csproj" />
1212
</Solution>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You need a compatible IDE to work with it, and .NET 9 SDK.
1212
| **Basics** | Yes | Bot initialization plus approachable command and slash-command flows such as reminders, avatar media-gallery previews, and Components V2-first teaching surfaces with room for challenge-driven extensions. |
1313
| **ApplicationCommands** | Yes | Create and use application commands: registration, deferred responses, Components V2 cards, autocomplete, DI-backed tags, role/help cards, and other practical command patterns. |
1414
| **Interactivity** | Yes | Interactivity, components (buttons, select menus), threads, stages, owner-scoped panels, and a practical multi-step task workflow with modal capture and follow-up handling. |
15-
| **VoiceNext** | Yes | Play local audio files and record incoming voice into timeline-aware per-speaker WAV files with the modern `DisCatSharp.Voice` package. |
15+
| **Voice** | Yes | Play local audio files and record incoming voice into timeline-aware per-speaker WAV files with the modern `DisCatSharp.Voice` package. |
1616
| **Lavalink** | Yes | Play audio from YouTube in voice channels with the current `DisCatSharp.Lavalink` package. |
1717
| **Hosting** | Yes | Initialize a bot as a service and surface host-backed runtime status through Components V2 cards. |
1818

@@ -30,4 +30,4 @@ You need a compatible IDE to work with it, and .NET 9 SDK.
3030
| `Hosting\Commands\AppCommands.cs` | Yes | Yes | No | No | No | Host-backed runtime status card for slash commands. |
3131
| `Interactivity\Commands\InteractivityCommands.cs` | Yes | Yes | No | No | Yes | Message, reaction, button, select, and workflow examples; `/workflow` now captures details via modal before follow-up buttons. |
3232
| `Interactivity\Program.cs` | Yes | Yes | No | No | No | Owner-scoped randomizer edits persistent Components V2 panels. |
33-
| `VoiceNext\Commands\RecordingCommands.cs` | Yes | Yes | No | No | No | Recording start/status/stop flows render Components V2 cards while uploading teachable, timeline-aware per-speaker WAV files. |
33+
| `Voice\Commands\RecordingCommands.cs` | Yes | Yes | No | No | No | Recording start/status/stop flows render Components V2 cards while uploading teachable, timeline-aware per-speaker WAV files. |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using DisCatSharp.Enums;
77
using DisCatSharp.Voice;
88

9-
namespace DisCatSharp.Examples.VoiceNext.Commands;
9+
namespace DisCatSharp.Examples.Voice.Commands;
1010

1111
/// <summary>
1212
/// Commands to connect and disconnect to the voice channel.
@@ -58,8 +58,8 @@ public static async Task LeaveAsync(InteractionContext ctx)
5858
}
5959

6060
// Get the current voice connection in the guild.
61-
var vnext = ctx.Client.GetVoice();
62-
var connection = vnext.GetConnection(ctx.Guild);
61+
var voice = ctx.Client.GetVoice();
62+
var connection = voice.GetConnection(ctx.Guild);
6363

6464
// Check if the bot is currently connected to the voice channel
6565
if (connection == null)
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using DisCatSharp.Enums;
1010
using DisCatSharp.Voice;
1111

12-
namespace DisCatSharp.Examples.VoiceNext.Commands;
12+
namespace DisCatSharp.Examples.Voice.Commands;
1313

1414
/// <summary>
1515
/// Playback control with these commands.
@@ -31,8 +31,8 @@ public class MusicCommands : ApplicationCommandsModule
3131
public static async Task PlayAsync(InteractionContext ctx, [Option("path", "Path to the audio file")] string path)
3232
{
3333
// Get the current voice connection in the guild.
34-
var vnext = ctx.Client.GetVoice();
35-
var connection = vnext.GetConnection(ctx.Guild);
34+
var voice = ctx.Client.GetVoice();
35+
var connection = voice.GetConnection(ctx.Guild);
3636

3737
if (connection == null)
3838
{
@@ -96,8 +96,8 @@ public static async Task PlayAsync(InteractionContext ctx, [Option("path", "Path
9696
public static async Task PauseAsync(InteractionContext ctx)
9797
{
9898
// Get the current voice connection in the guild.
99-
var vnext = ctx.Client.GetVoice();
100-
var connection = vnext.GetConnection(ctx.Guild);
99+
var voice = ctx.Client.GetVoice();
100+
var connection = voice.GetConnection(ctx.Guild);
101101

102102
if (connection == null)
103103
{
@@ -136,8 +136,8 @@ public static async Task PauseAsync(InteractionContext ctx)
136136
public static async Task ResumeAsync(InteractionContext ctx)
137137
{
138138
// Get the current voice connection in the guild.
139-
var vnext = ctx.Client.GetVoice();
140-
var connection = vnext.GetConnection(ctx.Guild);
139+
var voice = ctx.Client.GetVoice();
140+
var connection = voice.GetConnection(ctx.Guild);
141141

142142
if (connection == null)
143143
{
@@ -176,8 +176,8 @@ public static async Task ResumeAsync(InteractionContext ctx)
176176
public static async Task StopAsync(InteractionContext ctx)
177177
{
178178
// Get the current voice connection in the guild.
179-
var vnext = ctx.Client.GetVoice();
180-
var connection = vnext.GetConnection(ctx.Guild);
179+
var voice = ctx.Client.GetVoice();
180+
var connection = voice.GetConnection(ctx.Guild);
181181

182182
if (connection == null)
183183
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using DisCatSharp.Enums;
1212
using DisCatSharp.Voice;
1313

14-
namespace DisCatSharp.Examples.VoiceNext.Commands;
14+
namespace DisCatSharp.Examples.Voice.Commands;
1515

1616
/// <summary>
1717
/// Commands that demonstrate how to capture incoming voice and turn it into teachable WAV recordings.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// This file is used by Code Analysis to maintain SuppressMessage
2-
// attributes that are applied to this project.
3-
// Project-level suppressions either have no target or are given
4-
// a specific target and scoped to a namespace, type, member, etc.
5-
6-
using System.Diagnostics.CodeAnalysis;
7-
8-
[assembly: SuppressMessage("Usage", "CA2254:Template should be a static expression", Justification = "<Pending>", Scope = "member", Target = "~M:DisCatSharp.Examples.VoiceNext.Program.Main(System.String[])~System.Threading.Tasks.Task")]
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
using System.Diagnostics.CodeAnalysis;
7+
8+
[assembly: SuppressMessage("Usage", "CA2254:Template should be a static expression", Justification = "<Pending>", Scope = "member", Target = "~M:DisCatSharp.Examples.Voice.Program.Main(System.String[])~System.Threading.Tasks.Task")]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
using Serilog;
1414

15-
namespace DisCatSharp.Examples.VoiceNext;
15+
namespace DisCatSharp.Examples.Voice;
1616

1717
/// <summary>
1818
/// The program.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Voice Example
22

3-
This sample still lives in the `VoiceNext` folder, but the package reference now targets the modern `DisCatSharp.Voice` package introduced in the 10.7.0 line.
3+
This sample lives in the `Voice` folder and targets the modern `DisCatSharp.Voice` package introduced in the 10.7.0 line.
44

55
## What this sample covers
66

Voice/Voice.csproj

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../Common.targets" />
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
6+
<AssemblyName>DisCatSharp.Examples.Voice</AssemblyName>
7+
<RootNamespace>DisCatSharp.Examples.Voice</RootNamespace>
8+
<PackageId>DisCatSharp.Examples.Voice</PackageId>
9+
<Description>DisCatSharp Voice Example Bot</Description>
10+
<Authors>Lala Sabathil &lt;aiko@aitsys.dev&gt;, QuantuChi</Authors>
11+
<Copyright>2021-2024 AITSYS</Copyright>
12+
<PackageProjectUrl>https://examples.dcs.aitsys.dev</PackageProjectUrl>
13+
<RepositoryUrl>https://github.com/Aiko-IT-Systems/DisCatSharp.Examples</RepositoryUrl>
14+
<RepositoryType>git</RepositoryType>
15+
<Company>Aiko IT Systems</Company>
16+
<Product>DisCatSharp.Examples.Voice</Product>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
20+
<NoWarn>1701;1702;DV2001</NoWarn>
21+
</PropertyGroup>
22+
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
24+
<NoWarn>1701;1702;DV2001</NoWarn>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="DisCatSharp" Version="$(DisCatSharpVersion)" />
29+
<PackageReference Include="DisCatSharp.ApplicationCommands" Version="$(DisCatSharpVersion)" />
30+
<PackageReference Include="DisCatSharp.Voice" Version="$(DisCatSharpVersion)" />
31+
<PackageReference Include="Serilog" Version="4.3.0" />
32+
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2" />
33+
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
34+
</ItemGroup>
35+
36+
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
using Microsoft.Extensions.Logging;
1818

19-
namespace DisCatSharp.Examples.VoiceNext;
19+
namespace DisCatSharp.Examples.Voice;
2020

2121
internal static class VoiceRecordingStore
2222
{

0 commit comments

Comments
 (0)