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({
 | 
			
		||||
        value: user,
 | 
			
		||||
        key: user.id,
 | 
			
		||||
        display: `${user.username}#${user.discriminator}${
 | 
			
		||||
          user.nick ? ` (${user.nick})` : ""
 | 
			
		||||
        }`,
 | 
			
		||||
        display: `${user.tag}${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.";
 | 
			
		||||
 | 
			
		||||
  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++) {
 | 
			
		||||
    displayString +=
 | 
			
		||||
      (i === 9 ? "\ud83d\udd1f" : `${i + 1}\u20e3`) +
 | 
			
		||||
| 
						 | 
				
			
			@ -258,7 +258,7 @@ vote.callback = async function (msg, line) {
 | 
			
		|||
  if (!line) return "No topic given.";
 | 
			
		||||
 | 
			
		||||
  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: [
 | 
			
		||||
      ":ms_tick:503341995348066313",
 | 
			
		||||
      ":ms_cross:503341994974773250",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -758,9 +758,7 @@ command.callback = async function (msg, line) {
 | 
			
		|||
            return {
 | 
			
		||||
              key: item.id,
 | 
			
		||||
              display: (item.title ?? item.url).substr(0, 100),
 | 
			
		||||
              description: hasManageMessages
 | 
			
		||||
                ? `Added by: ${user.username}#${user.discriminator}`
 | 
			
		||||
                : "",
 | 
			
		||||
              description: hasManageMessages ? `Added by: ${user.tag}` : "",
 | 
			
		||||
            };
 | 
			
		||||
          }),
 | 
			
		||||
          30000,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,7 +110,7 @@ avatar.callback = async function (msg, line) {
 | 
			
		|||
      }
 | 
			
		||||
 | 
			
		||||
      const baseEmbed = {
 | 
			
		||||
        title: `Avatar for \`${member.username}#${member.discriminator}\``,
 | 
			
		||||
        title: `Avatar for \`${member.tag}\``,
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      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 baseEmbed = {
 | 
			
		||||
      title: `Avatar for \`${msg.author.username}#${msg.author.discriminator}\``,
 | 
			
		||||
      title: `Avatar for \`${msg.author.tag}\``,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    const normalAvatar = msg.author.avatar;
 | 
			
		||||
| 
						 | 
				
			
			@ -255,7 +255,7 @@ banner.callback = async function (msg, line) {
 | 
			
		|||
  return {
 | 
			
		||||
    embeds: [
 | 
			
		||||
      {
 | 
			
		||||
        title: `Banner for \`${user.username}#${user.discriminator}\``,
 | 
			
		||||
        title: `Banner for \`${user.tag}\``,
 | 
			
		||||
        url,
 | 
			
		||||
        image: {
 | 
			
		||||
          url,
 | 
			
		||||
| 
						 | 
				
			
			@ -505,16 +505,16 @@ flagdump.callback = async function (msg, line) {
 | 
			
		|||
    if (!user) {
 | 
			
		||||
      return "User not cached.";
 | 
			
		||||
    } else {
 | 
			
		||||
      return `\`${user.username}#${
 | 
			
		||||
        user.discriminator
 | 
			
		||||
      }\`'s public flags:\n\`\`\`${flagFromInt(user.publicFlags)}\`\`\``;
 | 
			
		||||
      return `\`${user.tag}\`'s public flags:\n\`\`\`${flagFromInt(
 | 
			
		||||
        user.publicFlags
 | 
			
		||||
      )}\`\`\``;
 | 
			
		||||
    }
 | 
			
		||||
  } else if (!isNaN(num)) {
 | 
			
		||||
    return `\`\`\`\n${flagFromInt(num)}\`\`\``;
 | 
			
		||||
  } else {
 | 
			
		||||
    return `\`${msg.author.username}#${
 | 
			
		||||
      msg.author.discriminator
 | 
			
		||||
    }\`'s public flags:\n\`\`\`${flagFromInt(msg.author.publicFlags)}\`\`\``;
 | 
			
		||||
    return `\`${msg.author.tag}\`'s public flags:\n\`\`\`${flagFromInt(
 | 
			
		||||
      msg.author.publicFlags
 | 
			
		||||
    )}\`\`\``;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
hf.registerCommand(flagdump);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue