Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using user secrets #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abcdefg30
Copy link
Member

Removes the need to change appsettings.json to locally run the bot.

Right click on the Orabot.Hosts.ConsoleHost project and select Manage User Secrets:
image

Then you can put the bot token inside there like this

{
	"BotToken": "token"
}

@@ -6,6 +6,7 @@

<ItemGroup>
<PackageReference Include="Discord.Net.WebSocket" Version="3.11.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifying user secrets as a configuration source feels like an implementation detail rather than a core "contract" detail (which is why you've used it in Orabot.Core and not Orabot.Core.Abstraction. Did you have a reason to add the package to the Abstraction project and not the implementation one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because I can't use AddUserSecrets otherwise which is an extension method from that package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants