Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format: 最後に改行を追加 #7

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/DiscordManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public static async Task ExecuteAsync<T>(SocketUserMessage message, Func<T, Task
if (onInitializeAsync != null) await onInitializeAsync.Invoke(presenter);
await presenter.RunAsync();
}
}
}
2 changes: 1 addition & 1 deletion Common/DiscordMessagePresenterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ namespace Approvers.King.Common;
public abstract class DiscordMessagePresenterBase : PresenterBase
{
public SocketUserMessage Message { get; init; } = null!;
}
}
2 changes: 1 addition & 1 deletion Common/PresenterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public static string UserName(IUser user)
return Sanitize((user as SocketGuildUser)?.Nickname ?? user.Username);
}
}
}
}
2 changes: 1 addition & 1 deletion Common/RandomUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public static T PickRandom<T>(this IEnumerable<T> source)
var array = source.ToArray();
return array[Random.Next(array.Length)];
}
}
}
2 changes: 1 addition & 1 deletion Common/SettingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public static string Get(string name)
return Configuration[name] ??
throw new Exception($"Environment variable {name} is not set.");
}
}
}
2 changes: 1 addition & 1 deletion Common/SilentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public static bool IsSilent(ulong userId)
{
return SilentUsers.TryGetValue(userId, out var expireTime) && !TimeManager.IsExpired(expireTime);
}
}
}
2 changes: 1 addition & 1 deletion Common/TimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public static bool IsExpired(DateTime time)
{
return GetNow() > time;
}
}
}
2 changes: 1 addition & 1 deletion Events/GachaCommandPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ protected override async Task MainAsync()
if (RandomUtility.IsHit(MasterManager.ReplyRate) == false) return null;
return MessageUtility.PickRandomMessage();
}
}
}
2 changes: 1 addition & 1 deletion Events/InteractReplyPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected override async Task MainAsync()
await Message.ReplyAsync(MessageUtility.PickRandomMessage());
}
}
}
}
2 changes: 1 addition & 1 deletion Events/MessageUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public static string PickRandomMessage()

return MasterManager.ReplyMessages[^1].message;
}
}
}
2 changes: 1 addition & 1 deletion Events/RareReplyPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ protected override async Task MainAsync()
await Message.ReplyAsync(MessageUtility.PickRandomMessage());
}
}
}
}
2 changes: 1 addition & 1 deletion Events/SilentCommandPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ protected override async Task MainAsync()
MentionUtils.MentionUser(Message.Author.Id));
await Message.ReplyAsync(message);
}
}
}
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ private static async Task BuildAsync(string[] args)
// 永久に待つ
await Task.Delay(-1);
}
}
}
2 changes: 1 addition & 1 deletion Triggers/DiscordTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ private static async Task OnMessageReceived(SocketMessage message)
// 発言
await DiscordManager.ExecuteAsync<RareReplyPresenter>(userMessage);
}
}
}