File tree Expand file tree Collapse file tree
src/Disc.NET.Commands/Contexts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using Disc . NET . Commands . Contexts . Models ;
2- using System ;
3- using System . Collections . Generic ;
4- using System . Linq ;
5- using System . Text ;
6- using System . Threading . Tasks ;
7- using Disc . NET . Client . SDK ;
1+ using Disc . NET . Client . SDK ;
82using Disc . NET . Client . SDK . Interfaces ;
93using Disc . NET . Client . SDK . Messages ;
4+ using Disc . NET . Commands . Contexts . Models ;
105using Disc . NET . Shared . Configurations ;
116
127namespace Disc . NET . Commands . Contexts
@@ -22,7 +17,7 @@ public class InteractionContext : IContext
2217
2318 public InteractionResponse Response { get ; set ; }
2419 }
25-
20+
2621 public class InteractionResponse ( AppConfiguration appConfiguration )
2722 {
2823 private readonly IClient _client = ClientSingleton . GetInstance ( appConfiguration ) ;
Original file line number Diff line number Diff line change 88
99
1010App app = new App ( ) . WithDebugLogger ( ) ;
11- var appConfiguration = new AppConfiguration ( "MTQzNjE3ODQ0ODkwMDE2MTYyMA.Gevo76.nqkBj12AGeZI-3BmCSLa6oz1_ETbvpb9tiXCFA" )
12- {
13- Intents = [ GatewayIntent . MESSAGE_CONTENT , GatewayIntent . GUILD_MESSAGES ] ,
14- ApplicationId = 1436178448900161620 ,
15- BotPrefix = '?'
16- } ;
11+ var token = Environment . GetEnvironmentVariable ( "GENERIC_BOT_TOKEN" ) ! ;
12+ var applicationId = Environment . GetEnvironmentVariable ( "GENERIC_BOT_APPLICATION_ID" ) ! ;
13+ var appConfiguration =
14+ new AppConfiguration ( token )
15+ {
16+ Intents = [ GatewayIntent . MESSAGE_CONTENT , GatewayIntent . GUILD_MESSAGES ] ,
17+ ApplicationId = long . Parse ( applicationId ) ,
18+ BotPrefix = '?'
19+ } ;
1720
1821// Tratar os lifetimes, por padrão é InstancePerDependency (uma nova toda vez que é resolvida)
1922app . UseDependencyInjection ( appConfiguration ) . WithHttpClient ( ) ;
20- await app . RunAsync ( appConfiguration ) ;
23+ await app . RunAsync ( appConfiguration ) ;
You can’t perform that action at this time.
0 commit comments