@page "/settings"
@using DiscordBotCore
@inject NotificationService NotificationService
Discord Bot requires a Bot Token, a prefix for normal commands and the server Ids on the servers it will be inDiscord Bot TokenBot prefixBot Server Ids:
@code {
private string _Token = string.Empty;
private string _Prefix = string.Empty;
private string _ServerIds = string.Empty;
protected override void OnInitialized()
{
base.OnInitialized();
if(Application.CurrentApplication.ApplicationEnvironmentVariables.TryGetValue("token", out var token))
{
_Token = token as string;
}
if(Application.CurrentApplication.ApplicationEnvironmentVariables.TryGetValue("prefix", out var prefix))
{
_Prefix = prefix as string;
}
if(Application.CurrentApplication.ApplicationEnvironmentVariables.TryGetValue("ServerID", out var serverIds))
{
if (serverIds is List