本文整理匯總了Java中net.dv8tion.jda.core.entities.Message.getIdLong方法的典型用法代碼示例。如果您正苦於以下問題:Java Message.getIdLong方法的具體用法?Java Message.getIdLong怎麽用?Java Message.getIdLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.dv8tion.jda.core.entities.Message
的用法示例。
在下文中一共展示了Message.getIdLong方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CommandMessage
import net.dv8tion.jda.core.entities.Message; //導入方法依賴的package包/類
public CommandMessage(Message message, boolean mentionableCommand, String[] aliasArguments) {
super(message.getIdLong(), message.getChannel(), message.isWebhookMessage(), message.getType());
this.mentionableCommand = mentionableCommand;
String rawContent = prepareRawContent(message.getRawContent(), aliasArguments != null);
if (aliasArguments != null) {
rawContent = ":alias " + String.join(" ", aliasArguments) + " " + rawContent;
}
this.setContent(rawContent)
.setAuthor(message.getAuthor())
.setTime(message.getCreationTime())
.setEditedTime(message.getEditedTime())
.setAttachments(message.getAttachments())
.setEmbeds(message.getEmbeds())
.setMentionedChannels(message.getMentionedChannels())
.setMentionedRoles(message.getMentionedRoles())
.setMentionedUsers(prepareMentionedUsers(message.getMentionedUsers()))
.setMentionsEveryone(message.mentionsEveryone())
.setReactions(message.getReactions())
.setPinned(message.isPinned())
.setTTS(message.isTTS());
}
示例2: createRemind
import net.dv8tion.jda.core.entities.Message; //導入方法依賴的package包/類
public Remind createRemind(long textChannelId, String prize, long expirationDate, long authorId) {
// create and send giveaway message
Message message = RubiconBot.getJDA().getTextChannelById(textChannelId).sendMessage(message(
remindEmbed("I will Remind " + RubiconBot.getJDA().getUserById(authorId).getName(),
"Ok i will remind you to do `" + prize + "`")))
.complete();
message.delete().queueAfter(10,TimeUnit.SECONDS);
// create and giveaway
Remind remind = new Remind(textChannelId, message.getIdLong(), prize, expirationDate, authorId);
remind.save();
return remind;
}
示例3: DefaultMessageEvent
import net.dv8tion.jda.core.entities.Message; //導入方法依賴的package包/類
public DefaultMessageEvent(JDA api, long responseNumber, Message message) {
super(api, responseNumber, message.getIdLong(), message.getChannel());
this.message = message;
}