Add simple response function to the InteractionBase to reduce the InteractionResponse copying
This commit is contained in:
parent
5a520ff567
commit
e74aeb1403
3 changed files with 9 additions and 11 deletions
|
@ -26,13 +26,18 @@ namespace Geekbot.Core.Interactions
|
|||
}
|
||||
|
||||
public virtual InteractionResponse GetExceptionResponse(Interaction interaction)
|
||||
{
|
||||
return SimpleResponse(Localization.Internal.SomethingWentWrong);
|
||||
}
|
||||
|
||||
protected InteractionResponse SimpleResponse(string message)
|
||||
{
|
||||
return new InteractionResponse()
|
||||
{
|
||||
Type = InteractionResponseType.ChannelMessageWithSource,
|
||||
Data = new()
|
||||
{
|
||||
Content = Localization.Internal.SomethingWentWrong
|
||||
Content = message
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue