I wanted to know if it was possible if you could use a bot to add another bot to the current server. Of course the bot would need permissions in the server, but is it possible? Is there a certain code that could be used?
Discord Bots are similar to user accounts in quiet a lot of ways however, bots cannot add other bots to a server.
This is mainly due to security and the fact that Discord wants the server admins to have full control over the server.
Related
I'm trying to make a multi-guild bot and I'm struggling with making a command that changes the bot avatar only for the guild where the command was executed!
I tried to make a DISCORD API call to change the bot user avatar but I ended by changing the avatar for all guilds.
You simply can't do that. Bots don't have access to some user functionalities like blocking someone, joining a server without a moderator's will and, in this case, change it's avatar/username depending on a server. An alternative is to create a webhook. You can change (with the necessary permissions) it's avatar and username at free will and it can send messages, embeds, files etc.. there's a full guide on discord.js webhooks if you want.
I have a bot that logs when invites are being created and the standard channel where the logs are going are only going to appear in the server / channel ID I placed there. I want to be able to change this per server it is in.
Output (What I am trying to achieve)
User: !log channel (CHANNEL ID)
Bot: New log channel set. (The logs will now log into the channel ID set, since the bot will be in a numerous amount of servers, I want it to only take affect if the channel ID matches the guild the command is being invoked in)
I want Server Owners and Administrators to be able to change the channel ID without accessing the VSC, how would I make it so anyone can change it outside of the VSC.
Notice: I want to be able to use this information and knowledge for another commands and features I am developing. If anyone knows a correct term for what I am trying to do here please let me know and I appreciate all the help. (I'm just looking for a term or a reference on how to do things like this, I'm not asking for the code)
While you can use classic message arguments as pointed out in the comments, I suggest you to use Discord's new slash commands feature. They allow for tight integration with Discord's clients and provides a much nicer user experience (autocomplete helps users with arguments).
However, discord.js v12 does not officially support slash commands (v13 does). You could:
use an external library: /create or
install v13-dev or
wait until v13 is released (not really suitable).
Edit: v13 has been released, and slash commands are now heavily recommended, with Discord now requiring verified bots to use them.
I have the following problem, I just created a bot that reads the messages of a specific channel and then I can use them, but I can only invite the bot to my own servers
Is there a way to copy the messages from a server and send them to where I am the administrator?
or to invite a bot to a server without being the administrator?
or make a bot that can read my own messages (since I am inside the discord)
I have been trying all this with discordjs and nodejs but I have not had good results, I can do it perfectly on my own server but when it is an external server I do not know how to do it, if someone knows please help <3
Technically, yes.
To invite a bot, you must have the "Manage Server" permission.
Discord's OAuth2 implementation can allow you to fetch messages from a channel the user has access to.
I'm not going to provide any code, examples, or further information as this seems like you're trying to invade other user's privacy, which will most likely get you banned from Discord.
So I'm fairly new to coding with JavaScript, specifically discord.js. I have a bot called Icarus installed on my Discord server which is capable of making a vocal countdown in a voice channel.
I'm trying to make a bot that can automatically activate the command for Icarus to do that every now and again.
I can get my bot to send the message
'!cd 10'
Which will start the countdown for the voice channel the sender is currently in for 10 seconds.
My bot is in the channel, but when it sends that message, nothing happens.
I believe this is because the owner of Icarus has put an If-statement in their code that prevents bots from activating commands.
Does anyone know a workaround for this?
Thanks.
Only work around would be to tell that bot owner to allow either all bot inputs or make an exception for your own.
There is no way for you to externally affect how another bot runs in that fashion.
We've developed a bot for our website which is used as a sort of messenger, the user selects if they want to speak to our support or chat team and it routes them to the correct team. The chat escalation and chat service is provided by Live Assist.
After developing the bot locally, all seemed to work fine, however once we launched it live, we discovered that the bot is only allowed one conversation at a time through Live Assist. What happens is anyone who opens the chat, no matter which device, is apart of the same single instance conversation. We contacted Live Assist and they said we require multiple bots to handle multiple chat instances. They did link us to a few of their online resources but they did not provide any advice for this particular problem (which we assume is a common one?)
I've been scratching my head at how something like this could be implemented, we are able to host multiple bots on Azure but I am stumped at finding a way to cleanly poll a bot to see if a conversation is in progress without interrupting that particular conversation. The only resource found which may assist is here however it is in node.js, whereas our solution is JavaScript on the front end and the bot code is C# .Net.
Any guidance would be greatly appreciated. Many thanks.
Edit: To clarify, we are wondering if what we want is possible, if it is possible to have multiple azure bot framework instances and reach them all through javascript on a webpage, poll if a chat is active, and then use a free bot for the user.
In bot framework, there is no built-in feature to accomplish this since natively bot framework supports multiple concurrent conversations across all channels. As a workaround for the limitation of Live Assist let me share one idea I have.
You could in some sort of data store have a time that resets everytime a message is sent/received and once that timer expires that would qualify the bot as "not in a conversation". In this scenario when your webpage loads, it would ping your datastore to see which bot was available and if one is available, return the direct line secret token for the available bot. This would cause your front end to load up the chat for the correct bot. I do not have an implementation to share because I have never seen a scenario like this, but I hope this helps.