Adding DiscordSocketClient to a service? #15
Answered
by
Hawxy
JohnSpade117
asked this question in
Q&A
-
Good evening, Thank you so much for your help! |
Beta Was this translation helpful? Give feedback.
Answered by
Hawxy
May 6, 2021
Replies: 1 comment
-
Hello, Use the factory lambda overload on the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Hawxy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Use the factory lambda overload on the
AddSingleton
call like so:.AddSingleton(x => new InteractivityService(x.GetRequiredService<DiscordSocketClient>(), TimeSpan.FromMinutes(3)))