Comments (4)
The code is missing intents. If you want the right one, there is the code:
const Discord = require('discord.js'); const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12 const { DiscordTogether } = require('discord-together'); client.discordTogether = new DiscordTogether(client); const prefix = "!"; // Change the prefix if you want. client.on('messageCreate', (message) => { // 'message' for Discord.js v12 if (message.author.bot || !message.content.startsWith(prefix)) return; let args = message.content.trim().split(/ +/); const commandName = args[0].slice(prefix.length).toLowerCase(); if (commandName === "start") { if(message.member.voice.channel) { client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => { return message.reply(`${invite.code}`); }); }; }; }); client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');Note: The code is better than the example.
Hope that you token is invalid...
lol its an example, Secret Bot Token Dont Share The Token Of The Bot
for the translate.
from discord-together.
The code is missing intents. If you want the right one, there is the code:
const Discord = require('discord.js');
const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12
const { DiscordTogether } = require('discord-together');
client.discordTogether = new DiscordTogether(client);
const prefix = "!"; // Change the prefix if you want.
client.on('messageCreate', (message) => { // 'message' for Discord.js v12
if (message.author.bot || !message.content.startsWith(prefix)) return;
let args = message.content.trim().split(/ +/);
const commandName = args[0].slice(prefix.length).toLowerCase();
if (commandName === "start") {
if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => {
return message.reply(`${invite.code}`);
});
};
};
});
client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');
Note: The code is better than the example.
from discord-together.
The code is missing intents. If you want the right one, there is the code:
const Discord = require('discord.js'); const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12 const { DiscordTogether } = require('discord-together'); client.discordTogether = new DiscordTogether(client); const prefix = "!"; // Change the prefix if you want. client.on('messageCreate', (message) => { // 'message' for Discord.js v12 if (message.author.bot || !message.content.startsWith(prefix)) return; let args = message.content.trim().split(/ +/); const commandName = args[0].slice(prefix.length).toLowerCase(); if (commandName === "start") { if(message.member.voice.channel) { client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => { return message.reply(`${invite.code}`); }); }; }; }); client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');Note: The code is better than the example.
Hope that you token is invalid...
from discord-together.
Thank you very much, I'll update the package
from discord-together.
Related Issues (20)
- no starting youtube together HOT 1
- Weird invite HOT 7
- Blocking a user from using youtube. HOT 1
- New Activity: Checkers in the Park HOT 4
- New Activities HOT 3
- Invite Customization HOT 1
- Type definition error?
- Add New Activity: Sketch Heads
- Check if all users left an Activity HOT 2
- Add New Activity: Ocho HOT 2
- Please publish to npm HOT 1
- Please fix the Sketchheads activity. HOT 3
- 3 games do not work HOT 2
- youtube dont work? HOT 4
- Add New Activity : Land-io HOT 1
- Sketch Heads no worky HOT 1
- Add New Activity: Ask Away & Know What I Meme
- Hacktoberfest 2022 HOT 3
- Didn't start
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-together.