I've been working on a command of which you input a user's ID an it will send an embed with their username, their discriminator and their profile picture.
I was wondering if is possible to also add the creation date of the user's account into the code.
Then once that's there, i'd like to add a section whether it says that they're a bot or not.
A very lazy answer but it's my way of saying you should check the documentation: User#createdAt
Related
Hi I'm not a coder and need guidance.
I'm creating a simple skill for Google Assistant in Dialogflow where the goal is to get a user's email. However, when I test it out verbally in Google actions console most of the time it picks up the wrong email address, (I'll say nhs.com and it thinks I'm saying something different) even though I have put example emails in the entities bit.
What is the solution around this? Is it possible to ask permission in Dialogflow to get a users data? I think Google Assistant says no you can only do that (account linking) if you build in Google Assistant? Can you ask the user to verbally spell out their email address, although no idea how you would go about doing that.
It is not recommended to ask the user for their email. Emails can have a very difficult structure consisting of characters and numbers. Because of this Google provides you with the option to retrieve the users details via accountlinking. I've listed some options for retrieving an email.
1) Google Sign-in (Requires Code)
Since you said you aren't a coder it will be a bit challenging to get the user's email easily. Your best option would be to use Google Sign-in accountlinking. This provides your bot with a flow that asks the user permission to use their email automatically.
To be able to use this code, you might have to use some code since I do not know if Dialogflow supports retrieving the user email from the webpage when using accountlinking.
The benefit of Google Sign-in is that you will get the active email that is in their Google profile.
2) Regex entity (Requires some technical knowledge about regex)
Dialogflow supports a feature called Regex Entities. With these entities you can provide a regex which will look through the user input for a pattern. If the user input matched the pattern it will take this from the user input. In your case you would need a regex to check for an email pattern.
With a regex entity the user can be prompted to tell their email. With this you approach you won't be certain if it actually is their real email and you might have to add a flow to double check if there weren't any typos in the email.
3) Email entity (Least technical option)
As Rally mentioned in the comments, Dialogflow also supports an email entity. This can be used to automatically detect an email in your user's input. Though it is an easy option to use, I've noticed that it doesn't always detect every email and since you can't improve it's behavior, it might not be the best choice. It definitely is the least technical option, but it might not always work.
Say, I want to create an account system. there is a user id, user name, user email and other fields.
I have the following "find_by" scenarios, so I will also have some "find_by" tables such as account_by_name, account_by_email.
When create an account, I need to check whether the name or email has already been used or not.
Considering the restrictions of batch and lwt, how to accomplish the logic above?
Try looking at the KillrVideo example project. You can look at the schema to see how the user tables were modeled, and look at the user DAO code to see how users are created using LWT. KillrVideo also has examples using other programming languages; you will find links to all the github repos on their website.
At the end of the conversation I am creating a basic card which asks for a review. If the user does give a review I don't want to ask them again the next time. So what would be the best way to do so ? At the moment I am wondering whether I can track whether they have clicked on the button which leads to the review link provided in the BasicCard or not.
The link button does not report anything back to your fulfillment, so there is no direct way to know if the link has been clicked.
One possible workaround is a little convoluted, but would let you track if the link has been followed. It assumes, however, that you are storing a unique userid in the user storage (and that this is allowed in your jurisdiction). In this case what you can do is
When you generate the card, the link would go to another URL that you control - not the review URL directly.
The link would also include a parameter that includes the userid you've generated for them.
At the code running at this link, you get the userid parameter, mark in the database that they've been sent to the review page, then redirect them to the review page.
In future conversations, you can get the userid from their user storage and check your own records to see if they've been sent to the review page. From here, you can decide if you want to show the card, include the link, etc.
So I was using Gmail Google Action on my Assistant device and One thing that I found particularly intriguing was that when a user has given its message and email, after that assistant gives options for change or adding the message. That means on selecting those options, assistant will change the value of message entity or edit it as per user command, without re-enabling the whole intent.
My question is how can I implement this functionality in my Google Action. Is there any particular function made by Google that I can use or do I have to create one from scratch ?
Gmail's integration is a bit different than the way a third-party developer would do it, but you can save user input from the current session and modify it later on in your conversation. In your Action, this wouldn't be just one intent, but a few that would handle the work of modifying some session data and finally using that data to complete the user's original action.
I've created two new custom attributes in the UserProfile. When the service we wrote returns data about a specific user by using the UserProfile object, sometimes the data isn't returned, even though if we look at the user in SSP it look populated. Some users work; this is the first user we set up with data. I'm not sure if sometime in the meantime after setting up the first user and testing, if there's something we ran and need to run again. How can I get all the users to get their data returned in a call to their UserProfile?
It may be a language issue, perhaps you can detect a pattern in working/not working users and their language?
Have you looked at the visibility of the custom attributes? Is it possible that it's a question of who is supposed to be able see the attribute that is causing your issue?
It could be connected to when the profile was created and when the attributes were added.
Is there any pattern to which users work and which do not?
Try creating a new user, and see if the attributes are available for that user.