Skip to content

Commit

Permalink
Moved bot credentials to a new file
Browse files Browse the repository at this point in the history
  • Loading branch information
angelobreuer committed Jun 16, 2019
1 parent 215a089 commit 40207b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

.vs/
.vscode/
BotCredentials.cs

# User-specific files
*.rsuser
Expand Down
4 changes: 2 additions & 2 deletions samples/Lavalink4NET.DSharpPlus.ExampleBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static void Main()
.AddSingleton<DiscordClient>()
.AddSingleton(new DiscordConfiguration
{
Token = "" // TODO insert your bot token here
Token = BotCredentials.Token
})

// Lavalink
Expand Down Expand Up @@ -94,7 +94,7 @@ private static async Task RunAsync()

// join channel
var track = await audioService.GetTrackAsync("<youtube search query>");
var player = await audioService.JoinAsync<LavalinkPlayer>(/* Your Guild Id */0, /* Your Voice Channel Id */0);
var player = await audioService.JoinAsync<LavalinkPlayer>(BotCredentials.GuildId, BotCredentials.VoiceChannelId);

using (player)
{
Expand Down

0 comments on commit 40207b1

Please sign in to comment.