Exemplo n.º 1
0
 public static string MessageLinkBack(this UserReactMessage message, ulong guildId)
 {
     if (message == null)
     {
         return("");
     }
     return($"https://discordapp.com/channels/{guildId.ToString()}/{message.ChannelId.ToString()}/{message.MessageId.ToString()}");
 }
Exemplo n.º 2
0
        /// <summary> Saves the prepared message if one is being prepared. </summary>
        public bool StoreNewMessage()
        {
            if (!IsPreparingMessage)
            {
                return(false);
            }

            // Make sure it isn't null (New config)
            ReactSettings.UserReactRoleList ??= new List <UserReactMessage>();

            ReactSettings.UserReactRoleList.Add(NewMessage);
            SaveSettings();

            NewMessage = null;

            return(true);
        }