I'm trying to make a python discord bot that takes in a mention as an input, which is working, but when it comes to the output, the title doesn't mention the user, but the description in the embed does (screenshot attached). How do I make it mention rather than printing <#[userid]>? Thanks in advance.
You can not mention role/user/channel in embed's title and embed's field name
Use the description or field's value, that's where mentions work
Related
I am little unsure whether the question suits here or SuperUser, but I have decided to post it here first.
While using Slack, I have encountered multiple situations in which I need to post same content to multiple channel / people. Let me explain with an example;
Hi Bill, please provide your;
First Name :
Last Name :
Age :
Email :
I will be sending (DM) the same question not just to Bill alone, but to others as well. What I can do now is that I can copy this message to notepad, or pin it in slack, and copy paste the content (and modify the name) every time I want to send the message to someone.
I am looking for something like a template, which pops up (if i type some command or press a button) and I can modify the content if necessary. I tried integrating slash commands and Slack app, but then I realized that the approach is wrong.
Is there any way to achieve this?
Useful links
https://slack.com/apps/AJGJWCYPQ-templates?tab=more_info
I've got many emails with the same format as shown in the screenshot above: Finished Product, Material Description and Assembly Location. Is there a way to extract specific data from an email? As seen from the screenshot above (the body of the email in outlook), I would like to get the result for Material Description; which in this case is Nike and paste over into an excel file.
That's pretty easy. First the overlook:
Now let's brake it down to the important parts so you can follow it way easy.
You need to following variables:
The Get Mail Messages activity works best when you already have Outlook installed. If so take that:
In the For Each activity you set the Type to MailMessage
In the Regular expression activity called Matches you go into the item.Body and matching all Material Description: (.+) occurrences.
And finally you do anything you want with the found matches. Make sure to use another for each here if you have more than one match. If not it's the easiest way to access the occurrence with Matches(0).toString and before check if there is any match given:
I'm migrating a discord bot to the new discord.py api, there's a part of editing messages, and its giving me that error..
output = "new text"
await message.edit(output)
Doc
am I reading the docs wrong? sry not a python literate, just helping a friend
The documentation states that there are multiple fields which can be specified. In your case, you need to have content=output for the message to be edited.
Hope that helps!
I'm using Sphinx4 version 4-1.0beta6 over my mac osx 10.9.1 through the terminal.
I'm still new in this SR application. I've already run HelloWrold example and added some new words to the gram file and it worked. Now, I'd like to use rules or something that helps in order to accept more sentences spoken by the user. My questions are:
How Can I make my HelloWorld do that? Should I use rules? and if so, is there any examples?
If I used rules, How can I print the spoken question back to the user?
Thanks in Advance.
How Can I make my HelloWorld do that? Should I use rules? and if so, is there any examples?
It depends on the task but generally you want to extend the grammar with more rules. You can find more information in CMUSphinx tutorial at http://cmusphinx.sourceforge.net
If I used rules, How can I print the spoken question back to the user?
You get the recognition result as string. You can print it with System.out.println or display in your UI or do whatever you want.
I have an edit field and I want to use it for numeric value.
Can anyone tell me how to enter only numeric value in edit field, I want to use it for phone number. I used BasicEditField.numeric but didn't work.
I also want to validate it in proper format....ddd-ddd-dddd.
Have you tried the BasicEditField with FILTER_PHONE? Example can be found here.
I've never seen anything you could use for validation you need in the BB API. RegExps are not supported in BB API, so you'll most likely have to write your own validator.