Skip to content

Add support for using user secrets - #61

Open
abcdefg30 wants to merge 1 commit into
OpenRA:masterfrom
abcdefg30:addUserSecrets
Open

Add support for using user secrets#61
abcdefg30 wants to merge 1 commit into
OpenRA:masterfrom
abcdefg30:addUserSecrets

Conversation

@abcdefg30

Copy link
Copy Markdown
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"
}


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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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