Updated Global settings
This commit is contained in:
parent
a6939b2220
commit
a0bd130a5f
6 changed files with 9 additions and 9 deletions
|
@ -445,7 +445,7 @@ public partial class Xp : EllieModule<XpService>
|
||||||
if (!string.IsNullOrWhiteSpace(item.Desc))
|
if (!string.IsNullOrWhiteSpace(item.Desc))
|
||||||
eb.AddField(GetText(strs.desc), item.Desc);
|
eb.AddField(GetText(strs.desc), item.Desc);
|
||||||
|
|
||||||
#if GLOBAL_NADEKO
|
#if GLOBAL_ELLIE
|
||||||
if (key == "default")
|
if (key == "default")
|
||||||
eb.WithDescription(GetText(strs.xpshop_website));
|
eb.WithDescription(GetText(strs.xpshop_website));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand
|
||||||
|
|
||||||
_excludedServers = new(allGuildConfigs.Where(x => x.XpSettings.ServerExcluded).Select(x => x.GuildId));
|
_excludedServers = new(allGuildConfigs.Where(x => x.XpSettings.ServerExcluded).Select(x => x.GuildId));
|
||||||
|
|
||||||
#if !GLOBAL_NADEKO
|
#if !GLOBAL_ELLIE
|
||||||
_client.UserVoiceStateUpdated += Client_OnUserVoiceStateUpdated;
|
_client.UserVoiceStateUpdated += Client_OnUserVoiceStateUpdated;
|
||||||
|
|
||||||
// Scan guilds on startup.
|
// Scan guilds on startup.
|
||||||
|
@ -1249,7 +1249,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand
|
||||||
if (template.Club.Icon.Show)
|
if (template.Club.Icon.Show)
|
||||||
await DrawClubImage(img, stats);
|
await DrawClubImage(img, stats);
|
||||||
|
|
||||||
// #if GLOBAL_NADEKO
|
// #if GLOBAL_ELLIE
|
||||||
await DrawFrame(img, stats.User.UserId);
|
await DrawFrame(img, stats.User.UserId);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
@ -1281,7 +1281,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand
|
||||||
return await _images.GetXpBackgroundImageAsync();
|
return await _images.GetXpBackgroundImageAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
// #if GLOBAL_NADEKO
|
// #if GLOBAL_ELLIE
|
||||||
private async Task DrawFrame(Image<Rgba32> img, ulong userId)
|
private async Task DrawFrame(Image<Rgba32> img, ulong userId)
|
||||||
{
|
{
|
||||||
var patron = await _ps.GetPatronAsync(userId);
|
var patron = await _ps.GetPatronAsync(userId);
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class DownloadTracker : IEService
|
||||||
/// <returns>Task representing download state</returns>
|
/// <returns>Task representing download state</returns>
|
||||||
public async Task EnsureUsersDownloadedAsync(IGuild guild)
|
public async Task EnsureUsersDownloadedAsync(IGuild guild)
|
||||||
{
|
{
|
||||||
#if GLOBAL_NADEKO
|
#if GLOBAL_ELLIE
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
await _downloadUsersSemaphore.WaitAsync();
|
await _downloadUsersSemaphore.WaitAsync();
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
public static class EllieInteractionExtensions
|
public static class EllieInteractionExtensions
|
||||||
{
|
{
|
||||||
public static MessageComponent CreateComponent(
|
public static MessageComponent CreateComponent(
|
||||||
this EllieInteractionBase nadekoInteractionBase
|
this EllieInteractionBase ellieInteractionBase
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var cb = new ComponentBuilder();
|
var cb = new ComponentBuilder();
|
||||||
|
|
||||||
nadekoInteractionBase.AddTo(cb);
|
ellieInteractionBase.AddTo(cb);
|
||||||
|
|
||||||
return cb.Build();
|
return cb.Build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ public static class ServiceCollectionExtensions
|
||||||
|
|
||||||
foreach (var svc in a.GetTypes()
|
foreach (var svc in a.GetTypes()
|
||||||
.Where(type => type.IsClass && types.Any(t => type.IsAssignableTo(t)) && !type.HasAttribute<DIIgnoreAttribute>()
|
.Where(type => type.IsClass && types.Any(t => type.IsAssignableTo(t)) && !type.HasAttribute<DIIgnoreAttribute>()
|
||||||
#if GLOBAL_NADEKO
|
#if GLOBAL_ELLIE
|
||||||
&& !type.HasAttribute<NoPublicBotAttribute>()
|
&& !type.HasAttribute<NoPublicBotAttribute>()
|
||||||
#endif
|
#endif
|
||||||
))
|
))
|
||||||
|
|
|
@ -229,7 +229,7 @@ public class CommandHandler : IEService, IReadyExecutor, ICommandHandler
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if !GLOBAL_NADEKO
|
#if !GLOBAL_ELLIE
|
||||||
// track how many messages each user is sending
|
// track how many messages each user is sending
|
||||||
UserMessagesSent.AddOrUpdate(usrMsg.Author.Id, 1, (_, old) => ++old);
|
UserMessagesSent.AddOrUpdate(usrMsg.Author.Id, 1, (_, old) => ++old);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue