當前位置: 首頁>>代碼示例>>Java>>正文


Java Message.getIdLong方法代碼示例

本文整理匯總了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());
}
 
開發者ID:avaire,項目名稱:avaire,代碼行數:24,代碼來源:CommandMessage.java

示例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;
}
 
開發者ID:Rubicon-Bot,項目名稱:Rubicon,代碼行數:13,代碼來源:RemindHandler.java

示例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;
}
 
開發者ID:Panzer1119,項目名稱:Supreme-Bot,代碼行數:5,代碼來源:DefaultMessageEvent.java


注:本文中的net.dv8tion.jda.core.entities.Message.getIdLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。