Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

An error has occurred: member.user.bannerURL is not a function #3

Open
KK-Designs opened this issue Sep 25, 2021 · 8 comments
Open

Comments

@KK-Designs
Copy link

My code has the require('discord-banner')(process.env.BOT_TOKEN); above where I instate client but for some reason I still get An error has occurred: member.user.bannerURL is not a function How to fix?

@Tolfx
Copy link
Member

Tolfx commented Sep 25, 2021

Mind providing a snippet of code of it?

@KK-Designs
Copy link
Author

I can't right now, can you send me like how it supposed to work? I'm using a command handler I don't know of that's the cause.

@Tolfx
Copy link
Member

Tolfx commented Sep 25, 2021

The examples should do it for now I assume. https://github.com/Tolfix/discord-banner#examples

@KK-Designs
Copy link
Author

Index.js:

require('dotenv').config();
require('discord-banner')(process.env.BOT_TOKEN);
const Discord = require('discord.js');
const client = new Discord.Client({
	intents: 32767,
	partials: [
		'MESSAGE',
		'CHANNEL',
		'REACTION',
		'GUILD_MEMBER',
		'USER',
	],
});

User-info.js:

const embed = new MessageEmbed().setImage(await member.user.bannerURL())
message.channel.send({ embeds: [ embed ] });

That is my code

@Tolfx
Copy link
Member

Tolfx commented Sep 26, 2021

Seems fine with me.
Mind providing your which version you are using on discord-banner and discord.js?

@KK-Designs
Copy link
Author

    "discord-banner": "^1.6.7",
    "discord.js": "^13.0.1"

These are my versions @Tolfx

@Tolfx
Copy link
Member

Tolfx commented Sep 26, 2021

    "discord-banner": "^1.6.7",
    "discord.js": "^13.0.1"

These are my versions @Tolfx

Should be fine what I've been testing, but you can still use getUserBanner method by requiring it.

const { getUserBanner } = require("discord-banner");

I'll look into it when I have the time.

@KK-Designs
Copy link
Author

ok

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants