chore: lint

This commit is contained in:
spiral 2022-06-10 18:49:36 -04:00
parent 58a9206d5c
commit 1c9a68cb53
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E
5 changed files with 7 additions and 7 deletions

View File

@ -136,7 +136,7 @@ public class Startup
app.UseEndpoints(endpoints =>
{
// register base / legacy routes
endpoints.MapMethods("", new string[] { }, (context) => { context.Response.Redirect("https://pluralkit.me/api"); return Task.CompletedTask;});
endpoints.MapMethods("", new string[] { }, (context) => { context.Response.Redirect("https://pluralkit.me/api"); return Task.CompletedTask; });
endpoints.MapMethods("v1/{*_}", new string[] { }, (context) => context.Response.WriteJSON(410, "{\"message\":\"Unsupported API version\",\"code\":0}"));
// register controllers

View File

@ -45,7 +45,7 @@ public class ProxiedMessage
_logChannel = logChannel;
// _cache = cache;
_metrics = metrics;
_proxy = proxy;
_proxy = proxy;
}
public async Task ReproxyMessage(Context ctx)
@ -61,7 +61,7 @@ public class ProxiedMessage
throw new PKError("Could not find a member to reproxy the message with.");
// Fetch members and get the ProxyMember for `target`
List <ProxyMember> members;
List<ProxyMember> members;
using (_metrics.Measure.Timer.Time(BotMetrics.ProxyMembersQueryTime))
members = (await _repo.GetProxyMembers(ctx.Author.Id, msg.Message.Guild!.Value)).ToList();
var match = members.Find(x => x.Id == target.Id);

View File

@ -529,8 +529,8 @@ public class SystemEdit
await ctx.Reply(
$"{Emojis.Warn} Are you sure you want to delete your system? If so, reply to this message with your system's ID (`{target.Hid}`).\n"
+$"**Note: this action is permanent,** but you will get a copy of your system's data that can be re-imported into PluralKit at a later date sent to you in DMs."
+" If you don't want this to happen, use `pk;s delete -no-export` instead.");
+ $"**Note: this action is permanent,** but you will get a copy of your system's data that can be re-imported into PluralKit at a later date sent to you in DMs."
+ " If you don't want this to happen, use `pk;s delete -no-export` instead.");
if (!await ctx.ConfirmWithReply(target.Hid))
throw new PKError(
$"System deletion cancelled. Note that you must reply with your system ID (`{target.Hid}`) *verbatim*.");

View File

@ -243,7 +243,7 @@ public class ProxyService
AllowEveryone = allowEveryone
});
await HandleProxyExecutedActions(ctx, autoproxySettings, trigger, proxyMessage, match, deletePrevious: false);
await _rest.DeleteMessage(originalMsg.ChannelId!, originalMsg.Id!);
}

View File

@ -31,7 +31,7 @@ public class RedisGatewayService
_redis = await ConnectionMultiplexer.ConnectAsync(_config.RedisGatewayUrl);
_logger.Debug("Subscribing to shard {ShardId} on redis", shardId);
var channel = await _redis.GetSubscriber().SubscribeAsync($"evt-{shardId}");
channel.OnMessage((evt) => Handle(shardId, evt));
}