Fixed a few fun bugs
Signed-off-by: Emotion <emotion@emotionchild.com>
This commit is contained in:
parent
145eee4337
commit
6f2ad42b90
3 changed files with 23 additions and 24 deletions
|
@ -1,6 +1,5 @@
|
|||
#nullable disable
|
||||
using Ellie.Common.Yml;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Ellie.Common;
|
||||
|
||||
|
@ -17,7 +16,7 @@ public sealed class Creds : IBotCredentials
|
|||
**DO NOT ADD PEOPLE YOU DON'T TRUST**
|
||||
""")]
|
||||
public ICollection<ulong> OwnerIds { get; set; }
|
||||
|
||||
|
||||
[Comment("Keep this on 'true' unless you're sure your bot shouldn't use privileged intents or you're waiting to be accepted")]
|
||||
public bool UsePrivilegedIntents { get; set; }
|
||||
|
||||
|
@ -30,15 +29,15 @@ public sealed class Creds : IBotCredentials
|
|||
""")]
|
||||
public int TotalShards { get; set; }
|
||||
|
||||
[Comment(
|
||||
[Comment(
|
||||
"""
|
||||
Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it.
|
||||
Then, go to APIs and Services -> Credentials and click Create credentials -> API key.
|
||||
Used only for Youtube Data Api (at the moment).
|
||||
""")]
|
||||
public string GoogleApiKey { get; set; }
|
||||
|
||||
[Comment(
|
||||
|
||||
[Comment(
|
||||
"""
|
||||
Create a new custom search here https://programmablesearchengine.google.com/cse/create/new
|
||||
Enable SafeSearch
|
||||
|
@ -67,14 +66,14 @@ public sealed class Creds : IBotCredentials
|
|||
|
||||
[Comment(@"Official GPT-3 api key.")]
|
||||
public string Gpt3ApiKey { get; set; }
|
||||
|
||||
|
||||
[Comment("""
|
||||
Which cache implementation should bot use.
|
||||
'memory' - Cache will be in memory of the bot's process itself. Only use this on bots with a single shard. When the bot is restarted the cache is reset.
|
||||
'redis' - Uses redis (which needs to be separately downloaded and installed). The cache will persist through bot restarts. You can configure connection string in creds.yml
|
||||
""")]
|
||||
public BotCacheImplemenation BotCache { get; set; }
|
||||
|
||||
|
||||
[Comment("""
|
||||
Redis connection string. Don't change if you don't know what you're doing.
|
||||
Only used if botCache is set to 'redis'
|
||||
|
@ -111,10 +110,10 @@ public sealed class Creds : IBotCredentials
|
|||
Used for cryptocurrency related commands.
|
||||
""")]
|
||||
public string CoinmarketcapApiKey { get; set; }
|
||||
|
||||
// [Comment(@"https://polygon.io/dashboard/api-keys api key. Free plan allows for 5 queries per minute.
|
||||
// Used for stocks related commands.")]
|
||||
// public string PolygonIoApiKey { get; set; }
|
||||
|
||||
// [Comment(@"https://polygon.io/dashboard/api-keys api key. Free plan allows for 5 queries per minute.
|
||||
// Used for stocks related commands.")]
|
||||
// public string PolygonIoApiKey { get; set; }
|
||||
|
||||
[Comment("""Api key used for Osu related commands. Obtain this key at https://osu.ppy.sh/p/api""")]
|
||||
public string OsuApiKey { get; set; }
|
||||
|
@ -172,7 +171,7 @@ public sealed class Creds : IBotCredentials
|
|||
RestartCommand = new RestartConfig();
|
||||
Google = new GoogleApiConfig();
|
||||
}
|
||||
|
||||
|
||||
public class DbOptions
|
||||
: IDbOptions
|
||||
{
|
||||
|
@ -270,4 +269,4 @@ public class GoogleApiConfig : IGoogleApiConfig
|
|||
{
|
||||
public string SearchId { get; init; }
|
||||
public string ImageSearchId { get; init; }
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ using System.Net.Http.Json;
|
|||
using System.Text;
|
||||
using Ellie.Common.ModuleBehaviors;
|
||||
|
||||
namespace NadekoBot.Modules.Administration.Self;
|
||||
namespace Ellie.Modules.Administration.Self;
|
||||
|
||||
public sealed class CheckForUpdatesService : IEService, IReadyExecutor
|
||||
{
|
||||
|
|
|
@ -13,9 +13,9 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
{
|
||||
N = 0, No = 0, None = 0,
|
||||
T = 1, Track = 1, S = 1, Song = 1,
|
||||
Q = 2, Queue = 1, Playlist = 2, Pl = 2
|
||||
Q = 2, Queue = 2, Playlist = 2, Pl = 2
|
||||
}
|
||||
|
||||
|
||||
public const string MUSIC_ICON_URL = "https://i.imgur.com/nhKS3PT.png";
|
||||
|
||||
private const int LQ_ITEMS_PER_PAGE = 9;
|
||||
|
@ -86,7 +86,7 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private async Task QueueByQuery(string query, bool asNext = false, MusicPlatform? forcePlatform = null)
|
||||
{
|
||||
var succ = await QueuePreconditionInternalAsync();
|
||||
|
@ -110,10 +110,10 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
try
|
||||
{
|
||||
var embed = _eb.Create()
|
||||
.WithOkColor()
|
||||
.WithAuthor(GetText(strs.queued_track) + " #" + (index + 1), MUSIC_ICON_URL)
|
||||
.WithDescription($"{trackInfo.PrettyName()}\n{GetText(strs.queue)} ")
|
||||
.WithFooter(trackInfo.Platform.ToString());
|
||||
.WithOkColor()
|
||||
.WithAuthor(GetText(strs.queued_track) + " #" + (index + 1), MUSIC_ICON_URL)
|
||||
.WithDescription($"{trackInfo.PrettyName()}\n{GetText(strs.queue)} ")
|
||||
.WithFooter(trackInfo.Platform.ToString());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(trackInfo.Thumbnail))
|
||||
embed.WithThumbnailUrl(trackInfo.Thumbnail);
|
||||
|
@ -131,7 +131,7 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task MoveToIndex(int index)
|
||||
{
|
||||
if (--index < 0)
|
||||
|
@ -150,7 +150,7 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
|
||||
mp.MoveTo(index);
|
||||
}
|
||||
|
||||
|
||||
// join vc
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
|
@ -168,7 +168,7 @@ public sealed partial class Music : EllieModule<IMusicService>
|
|||
|
||||
await _service.JoinVoiceChannelAsync(user.GuildId, voiceChannelId.Value);
|
||||
}
|
||||
|
||||
|
||||
// leave vc (destroy)
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
|
|
Loading…
Reference in a new issue