Add unique ID for each context
This commit is contained in:
1 parent
c021f84415
commit
ffb393706b
1 file changed
+9
@@ -43,6 +43,15 @@ public class MessageCommandContext extends CommandContext {
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return String.format("%s:%s:%s:%s",
|
||||||
|
getGuild() == null ? "PrivateMessage" : getGuild().getId(),
|
||||||
|
getChannel().getId(),
|
||||||
|
getDiscordUser().getId(),
|
||||||
|
message.getId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChannelType getType() {
|
public ChannelType getType() {
|
||||||
return event.getChannelType();
|
return event.getChannelType();
|
||||||
|
|||||||
Reference in new issue
Block a user