use User.tag
This commit is contained in:
		
							parent
							
								
									5557b96997
								
							
						
					
					
						commit
						187f2d5a7f
					
				
					 4 changed files with 13 additions and 17 deletions
				
			
		| 
						 | 
					@ -310,9 +310,7 @@ async function lookupUser(msg, str, filter) {
 | 
				
			||||||
      selection.push({
 | 
					      selection.push({
 | 
				
			||||||
        value: user,
 | 
					        value: user,
 | 
				
			||||||
        key: user.id,
 | 
					        key: user.id,
 | 
				
			||||||
        display: `${user.username}#${user.discriminator}${
 | 
					        display: `${user.tag}${user.nick ? ` (${user.nick})` : ""}`,
 | 
				
			||||||
          user.nick ? ` (${user.nick})` : ""
 | 
					 | 
				
			||||||
        }`,
 | 
					 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -233,7 +233,7 @@ poll.callback = async function (msg, line, topic, ...options) {
 | 
				
			||||||
  if (arrOptions.length < 2) return "A minimum of two options are required.";
 | 
					  if (arrOptions.length < 2) return "A minimum of two options are required.";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const reactions = [];
 | 
					  const reactions = [];
 | 
				
			||||||
  let displayString = `**${msg.author.username}#${msg.author.discriminator}** has started a poll:\n**__${topic}__**\n`;
 | 
					  let displayString = `**${msg.author.tag}** has started a poll:\n**__${topic}__**\n`;
 | 
				
			||||||
  for (let i = 0; i < arrOptions.length; i++) {
 | 
					  for (let i = 0; i < arrOptions.length; i++) {
 | 
				
			||||||
    displayString +=
 | 
					    displayString +=
 | 
				
			||||||
      (i === 9 ? "\ud83d\udd1f" : `${i + 1}\u20e3`) +
 | 
					      (i === 9 ? "\ud83d\udd1f" : `${i + 1}\u20e3`) +
 | 
				
			||||||
| 
						 | 
					@ -258,7 +258,7 @@ vote.callback = async function (msg, line) {
 | 
				
			||||||
  if (!line) return "No topic given.";
 | 
					  if (!line) return "No topic given.";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    content: `**${msg.author.username}#${msg.author.discriminator}** has started a vote:\n**__${line}__**\n<:ms_tick:503341995348066313>: Yes\n<:ms_cross:503341994974773250>: No`,
 | 
					    content: `**${msg.author.tag}** has started a vote:\n**__${line}__**\n<:ms_tick:503341995348066313>: Yes\n<:ms_cross:503341994974773250>: No`,
 | 
				
			||||||
    addReactions: [
 | 
					    addReactions: [
 | 
				
			||||||
      ":ms_tick:503341995348066313",
 | 
					      ":ms_tick:503341995348066313",
 | 
				
			||||||
      ":ms_cross:503341994974773250",
 | 
					      ":ms_cross:503341994974773250",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -758,9 +758,7 @@ command.callback = async function (msg, line) {
 | 
				
			||||||
            return {
 | 
					            return {
 | 
				
			||||||
              key: item.id,
 | 
					              key: item.id,
 | 
				
			||||||
              display: (item.title ?? item.url).substr(0, 100),
 | 
					              display: (item.title ?? item.url).substr(0, 100),
 | 
				
			||||||
              description: hasManageMessages
 | 
					              description: hasManageMessages ? `Added by: ${user.tag}` : "",
 | 
				
			||||||
                ? `Added by: ${user.username}#${user.discriminator}`
 | 
					 | 
				
			||||||
                : "",
 | 
					 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
          }),
 | 
					          }),
 | 
				
			||||||
          30000,
 | 
					          30000,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,7 +110,7 @@ avatar.callback = async function (msg, line) {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const baseEmbed = {
 | 
					      const baseEmbed = {
 | 
				
			||||||
        title: `Avatar for \`${member.username}#${member.discriminator}\``,
 | 
					        title: `Avatar for \`${member.tag}\``,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const normalAvatar = member.user.avatar;
 | 
					      const normalAvatar = member.user.avatar;
 | 
				
			||||||
| 
						 | 
					@ -155,7 +155,7 @@ avatar.callback = async function (msg, line) {
 | 
				
			||||||
    const guild = msg.channel.guild || hf.bot.guilds.get(msg.guildID);
 | 
					    const guild = msg.channel.guild || hf.bot.guilds.get(msg.guildID);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const baseEmbed = {
 | 
					    const baseEmbed = {
 | 
				
			||||||
      title: `Avatar for \`${msg.author.username}#${msg.author.discriminator}\``,
 | 
					      title: `Avatar for \`${msg.author.tag}\``,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const normalAvatar = msg.author.avatar;
 | 
					    const normalAvatar = msg.author.avatar;
 | 
				
			||||||
| 
						 | 
					@ -255,7 +255,7 @@ banner.callback = async function (msg, line) {
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    embeds: [
 | 
					    embeds: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        title: `Banner for \`${user.username}#${user.discriminator}\``,
 | 
					        title: `Banner for \`${user.tag}\``,
 | 
				
			||||||
        url,
 | 
					        url,
 | 
				
			||||||
        image: {
 | 
					        image: {
 | 
				
			||||||
          url,
 | 
					          url,
 | 
				
			||||||
| 
						 | 
					@ -505,16 +505,16 @@ flagdump.callback = async function (msg, line) {
 | 
				
			||||||
    if (!user) {
 | 
					    if (!user) {
 | 
				
			||||||
      return "User not cached.";
 | 
					      return "User not cached.";
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      return `\`${user.username}#${
 | 
					      return `\`${user.tag}\`'s public flags:\n\`\`\`${flagFromInt(
 | 
				
			||||||
        user.discriminator
 | 
					        user.publicFlags
 | 
				
			||||||
      }\`'s public flags:\n\`\`\`${flagFromInt(user.publicFlags)}\`\`\``;
 | 
					      )}\`\`\``;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else if (!isNaN(num)) {
 | 
					  } else if (!isNaN(num)) {
 | 
				
			||||||
    return `\`\`\`\n${flagFromInt(num)}\`\`\``;
 | 
					    return `\`\`\`\n${flagFromInt(num)}\`\`\``;
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    return `\`${msg.author.username}#${
 | 
					    return `\`${msg.author.tag}\`'s public flags:\n\`\`\`${flagFromInt(
 | 
				
			||||||
      msg.author.discriminator
 | 
					      msg.author.publicFlags
 | 
				
			||||||
    }\`'s public flags:\n\`\`\`${flagFromInt(msg.author.publicFlags)}\`\`\``;
 | 
					    )}\`\`\``;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
hf.registerCommand(flagdump);
 | 
					hf.registerCommand(flagdump);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue