how to check if user is still speaking java discord bot code example
Example 1: check if message mentions users discord js
// 1st Way
if (<Message>.mentions.members.size) { // or message.mentions.members.size > 0
//DO STUFF
}
// 2nd Way
if (<Message>.mentions.members.first()) {
//DO STUFF
}
Example 2: twitter bot know if you already retweeted
//If your issue is that the script is not continuing, you can use try and except instead.
try:
tweet.retweet()
except tweepy.TweepError as e:
print(e)
//In this case, you'll get the following message printed and will continue to retweet next tweets that are matching your search.
//Output: [{u'message': u'You have already retweeted this Tweet.', u'code': 327}]