Discord.py Buttons (Not in embed) - discord.py

So I came across a bot called GameBot, and when you send a command, it sends buttons like so:
picture
an anyone tell me how they did this??

Buttons are a new discord feature that are not yet supported by the official discord.py library.
There is however a third party library called discord components that is mentioned above, however, it is best to wait until it is supported by discord.py
There is currently no ETA on when buttons and slash commands will be supported however it will be a lot more beneficial to wait than use third party services.

This is a new Discord feature. I personally use this feature for my bot too since the discord-buttons library is outdated, you can use the discord-components library instead.

Related

discord py - Implement stickers in embeds

I make a discord bot and want to display member messages in an embed. So, that's work, but how can I put the Sticker from a member (if he's posting it) into an embed? I read the docs, but it really confuses me.
How can i use the sticker from the user, in the bot embed?
Discord currently has not noted that in it's documentation which shows it would not be currently possible (at least in Discord.py)
Stickers also do not have support globally yet, some countries have not got access to Discord stickers which could also potentially affect the use of embeds and cause multiple issues/bugs, in which seems as why they have not added it to the API.
I can't test this myself, as I can't access stickers myself yet, but creating a webhook and sending a sticker in theory should work, hope this somewhat helps.

`for member in guild.members` stopped working one day

I've been using for member in guild.members (or ctx.guild.members) since creatting my bot this spring and its worked no problem. Then one day, it only lists the bot itself.
Did we get a new version of discord.py or something?
Discord.py 1.5.0+ requires you to enable "Intents". In order to get a member list of a server, you will need to enable the server member intent in the discord developer portal (Click your bot application, and go to the bot tab), take a look at this link: https://discordpy.readthedocs.io/en/latest/intents.html#privileged-intents if you can't seem to find it. After you have done that, you need to do this in your code too.
For the code part, i think it's easier if you take a look at the discord.py docs yourself.

sending a message to bot: v3 directline.postActivity vs. v4 dispatch from webchat store

We are migrating from BotFramework-Webchat v3 to v4. Usually we send a message from the chat through the directline object created from v3 BotChat using the directline.postActivity function. However in our v4 implementation there were issues with the behavior of messages shown in the chat window when posting activities like this.
It seems that sending messages through the webchat redux store as shown in this example is the recommended approach.
I am wondering what is the difference between these two usages? It seems something is different between v3 and v4 versions and I am having difficulty finding references in the documentation about this. Should directline.postActivity be avoided completely?
It isn't documented anywhere, but best practice is what is demonstrated via the samples, by use of the Web Chat redux store and its list of available actions.
Essentially, Web Chat v4 is built on top of BotFramework-DirectlineJS which does use observables. Web Chat then translates the Direct Line observables into its own methods for consumption internally and by the user.
As you noted, it is possible to use the Direct Line observables in Web Chat but it is neither the best method nor the best practice to do so. Primarily, because Web Chat wasn't specifically designed around their use, except internally. It can work, but it opens you up to potentially curious behavior.

Adding Speech to Text feature in RASA

I need to add Speech to text feature in RASA, where user can ask questionsusing his voice and bot will answer him by chat. Does anyone know how can I do it in RASA?
As my front-end will be an Android Application. Kindly do tell me how to do it.
Thanks in Advance.
You can build a voice bot with Rasa Open Source as long as you use a Speech to Text (STT) API, since Rasa will only process text. This would involve building a custom channel that takes the voice as input, sends it to a STT API and returns the text to Rasa.
You can find some detailed examples on the Rasa blog:
https://blog.rasa.com/how-to-build-a-voice-assistant-with-open-source-rasa-and-mozilla-tools/
https://blog.rasa.com/how-to-build-a-mobile-voice-assistant-with-open-source-rasa-and-aimybox/
If you don't mind using something closed source, integrating the Google Speech API is also an option.

Which bot framework to use (if any) for a Kik, Facebook, & Slack messaging bot using javascript?

I'm building a chatbot that will need to be launched on Kik, Facebook, and Slack. I'm unsure of where to start in terms of using a bot framework or whether I should create something custom myself.
I don't believe I will need any NLP. The user is going to be pushed down a very structured path, that will use buttons to guide the users to the next prompts and will also share with the user links and media.
Microsoft Bot Framework seems like the main framework I should look at, but its unclear to me how useful it will be if I end up wanting to deliver responses that are custom to each messaging platform. Meaning, on Facebook I may want to take advantage of a custom feature that they have like buttons or templates and on Kik I will want to take advantage of suggested keyboards.
Any suggestions or guidance is appreciated.
BotFramework will do the translation for you. Write to the BotFramework schema and it will using buttons for Facebook and keyboards for Kik.

Resources