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.
Related
I might be missing something really simple but don't seem to find the solution.
I have created a quick and simple app which is meant to do some processing every morning and then send some logs to Slack.
I have been perfectly able to do so using Incoming Webhooks. Cool. The "problem" is that it requires me to set it up from the app settings (aka it obviously makes me define a specific channel for the Webhook so I can have the specific URL) and that's something I like a bit less.
I thought it'd be easier if I can just add/integrate the app on a channel using the Slack UI so I don't have to worry about having to know beforehand the channel(s) ID where the message has to go to and also any other user would be able to integrate in any other channel they consider.
I have integrated it on my testing channel (all good) and tested chat.postMessage (all good) but it still needs the channel (obviously). However, using conversations.list lists ALL channels and that's the opposite of what I'm looking for.
I need a way of getting just those channels where the app is integrated so I can post the message to those and only those.
Is this something that Slack doesn't allow or I'm just missing something very obvious here?
I hope it makes sense and someone can shed some light on this :)
You can use users.conversations method to get list conversations the calling user/bot may access.
https://api.slack.com/methods/users.conversations
Use Bot token to call the API.
Use type argument to search public, private, mpim & im conversations
https://api.slack.com/methods/users.conversations#arg_types
Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im
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.
Trying to parse through the Microsoft Documentation of this is a bit of a challenge.
Our use case is that we want the app to receive broadcasts from an external service. On that broadcast we want it to send a personalized message to every person in the team/org.
Is that at all possible? Doing this in Workplace and Slack was fairly straight forward but i'm going nowhere fast with Teams. Connectors seem weird and user-based, not team based, requiring you to set up a config page for it? Bots seem centered around AI interactions and on demand features and general apps? Not sure.
So yea the question is, is it possible. If so i would appreciate to know where to look for how to do this.
Yes, this is definitely possible. If you're wanting to send to a Team (i.e. a Channel within a Team) you can use either a bot or a webhook. If you want to send to individuals or to group chats, then you'd be looking to use a bot.
For webhooks, see Post external requests to Teams with incoming webhooks. For bots you can start here, and in that case you'd want to look into something called "Pro-active messaging", where the bot is sending a message on it's own, rather in response to a user's initial message.
The Pro-active messaging can be a bit tricky, so if you do want to go that approach (1 to 1 messaging), let me know in the comments and I give you some more guidance. However, I'd suggest rather looking at messaging the Team, and creating/using a relevant channel, rather than sending every user a 1-1 message.
I just got into developing my Slack bot, but I don't know (yet) how to do certain things, or if they're even possible.
What I basically want (for example) is that the bot gets my Slack username and returns it to me.
If I would know how to do this, I could integrate much more interesting things into my bot. I did check the documentation, but (as far as I could see) there was nothing on this subject.
Another thing I want to achieve is making the bot do a call to my custom API.
If anyone would give me a helping hand (example/link to some great examples/documentation for example) I would greatly appreciate it!
I managed yesterday to get the information from Slack using a debug command (console.log Object(msg)). This gave me all the information I wanted.
After going through lots of codes provided over the internet, I am still unable to list my SMS app in default Android kitkat version. I don't know whether it can be done by adding permissions to the manifest file or through .java code.
The only thing I want is to, provide me some to-the-point code which I can make a new blank project(ABC), set the code in and that should set my app (ABC) the default sms app.
You can't directly set your app to be default, that would be a nasty security risk. What you can do is to signal to the user that you want your status to be changed and the user will decide:
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, activity.getPackageName());
activity.startActivity(intent);
However, to be eligible for becoming a default SMS app, you have to implement all of the functionality required from such an app, and this includes the handling of all SMS/MMS related functionality (sending and receiving, notifications, etc). This practically means that you have to rewrite the complete related functionality of the phone, including all receivers, intents, filters and code (and you should be aware that SMS and especially MMS handling is not part of the system, it requires quite a lot of your own code). And this is also the reason why you won't be able to receive an answer that fits into the confines of a SO answer. Way too much code: basically, a complete app.
There is no way out: if you want the user to replace the default SMS app, the user will rightfully expect that whatever app they choose will continue to support all of the functionality. Unless you provide all that, your app will not be listed among the eligible ones and the intent above will not work.
The Android Developers blog of Google has an article titled Getting Your SMS Apps Ready for KitKat that gives you the very first steps in learning what's expected from you in this scenario.