Discord.jsv13 Select menu doesn't appear - discord

I would like to do a set Welcome with Select menu but the menu doesn't appear
Code screen
The result
The Console

It's a typo in your code. When you send your messageSelectMenu, you spell components as conponents. Correct the spelling and you should be good to go. Note: You also don't use the embed even though you declare it. If you want to send it, you can do it by using: interaction.reply({ embeds: [embed] })

Related

How to Import a constant of an user id from another file

I've been trying to import a constant with an user id from another file for a while but it shows up as undefined. Basically I want to use the user that this constant gets
const user = interaction.options.getUser("target");
in another file, the "target" here is the user that the slash command author is mentioning when using a slash command, I want to use it in a button handler to be specific, and use it in this
.setDescription(`${interaction.user} has given a like to ${user} `)
but I can't seem to figure out how to get the user that the constant obtains as all I've tried so far has resulted in "undefined" showing up and not the user. any help is appreciated
So you can do this. The first block of code is for the embed that has the buttons and is simple.
.setFooter({
text: `${user.id}`
})
This block will go in your interaction.isButton() section for the code that works when they click the button to confirm
const member = interaction.guild.members.cache.get(interaction.message.embeds[0].footer.text)
console.log(member)

Check if text is in something - Discord Js

developers! I'm making a Roblox Verification bot and I need to see if there is text located inside of a user's blurb.
I've tried a few things, the issue is, I don't want them to just set the blurb to the code, I'll explain.
If I do
if(emojis === blurb){
//do stuff
}
then it'll only work if the blurb is exactly the code.
I want it to trigger if the emojis are inside the blurb at all.
So if the emojis are 😀💯🔹 and their blurb is: "Bob ate an apple 😀💯🔹", the code will trigger.
Any help is appreciated, thank you!
Ah, I've fixed it!
The correct code is:
if(blurb.includes(emojiList)){
// do something
{

Exclude Page from being tracked in Omniture

Is there a way to remove single page from being tracked in Omniture(Site Catalyst). I want to track all pages instead of only one page. I don't want to send request to Omniture if that page has been hit.
Is there a way to update script for that?
Thanks
Yes, there is a way. If you click the cog next to the Adobe Analytics Tool on the Overview page in DTM you'll be taken to a settings page. The tab on the bottom titled Customize Page Code, this will run before your adobe beacon would normally be sent. Simply put your logic to select the correct page and then return false and your tracking beacon wont fire.
if (location.pathname =='whatever') {
return false;
}
**If you don't have any idea what you're doing codewise, be careful. There is a lot of breakage and data loss that can occur if users put bad code here.
If you're unfamiliar with javascript, I would suggest seeking out a little help. If you want to give it a shot but you're unsure of your code, I would suggest navigating to the page that you want to remove, opening the console (F12), and typing location.pathname. This will give you the exact string to test again so your code should be:
if (location.pathname == 'whatever/string/the/location/pathname/gave/you') {
return false;
}
Make sure you don't forget the quotes. Good luck!

React-Native: Code compiling correctly but screens are empty

I am fairly new to react native and have been attempting to build a very simple registration app.
Currently I have 2 screens running, the first landingscreen.js includes a button to prompt the first registration screen.
This screen works fine but its title shows as blank. (I am using react-navigator)
Below is the screen and you can find the corresponding code here.
On clicking the register here button the next screen is prompted which should show two fields an email and password field with the title "Let's create an account". As you can see below , all that works is the next button but I have no compilation errors. The code pertaining to this screen may be accessed here.
Any help or way pointing would be more than appreciated.
Thanks,
J.
Change navigation(you have written navigtion) spelling
static navigationOptions= {
title: "Let's make an account",
}
The headers not being seen was solved as #Paras Watts noted by fixing a spelling mistake.
To get the fields to show I then put the jsx pertaining to the form in the same render as the navigation also changing any tags to view to stick to the format of jsx.

cakephp: delayed flash messages

Is there any functionality that allow me do something like flash messages in cakephp? I don't want to use session, because it shows flash message on the next page.
For example:
user type link with mistake mysite?action=mistake and i want to check in controller if there isnt mistakes like this so i have array with some actions which are allowed and i check if $this->params['url']['action'] is there. If it isn't i want to show error to user , but this error shows only on second page (or if i reload). How can i avoid this?
The error you see is just a div with a concrete style. Something like:
<div id="flashMessage" class="error-message">Error</div>
What you could do is check with Javascript whatever you want to check and if it is not as expected, append the error div wherever you want.
That's what I have dont in some forms to show the error in real time.
If you want something more elaborate you could try this:
http://www.alfbd.com/cakephp-ajax-form-validation-with-jquery-and-jsonview/

Resources