skpy to send a message to a group with user mention - python

I need to mention particular user in the message that I sent to a group in Skype. I can send the message easily with the skpy but can't figure it out how to mention someone in the message.
sk=Skype("userid","paasword")
SendMsgTo=sk.chats["group-id"]
SendMsgTo.sendMsg("hello")
there is this sendRaw() thing in skpy which I think I'll have to use, but can't figure it out how to use.
I am new to python and finding my way through the google and the great community of stackoverflow and the similar. So a little help will greatly be appreciated

You can use
SendMsgTo.sendMsg('<at id="8:USER_ID">USER_NAME</at> ', rich=True)
also, if you don't know USER_ID use the SendMsgTo.userIds to find all USER_ID in the group

Related

How to detect Facebook posts in a group then comment on it?

Basically, I'm trying to write python script that runs on my computer and detects new posts in a group and if it has some keywords in it, it comments a specified string. I'm currently stuck at the beginning.
Initially, I wanted to use Graph API, but it required some kind of business verification. I haven't found a working alternative yet, so literally any advice is more than welcome.
Thank you in advance for all answers!

Make automation in Skype using Python [duplicate]

I need to mention particular user in the message that I sent to a group in Skype. I can send the message easily with the skpy but can't figure it out how to mention someone in the message.
sk=Skype("userid","paasword")
SendMsgTo=sk.chats["group-id"]
SendMsgTo.sendMsg("hello")
there is this sendRaw() thing in skpy which I think I'll have to use, but can't figure it out how to use.
I am new to python and finding my way through the google and the great community of stackoverflow and the similar. So a little help will greatly be appreciated
You can use
SendMsgTo.sendMsg('<at id="8:USER_ID">USER_NAME</at> ', rich=True)
also, if you don't know USER_ID use the SendMsgTo.userIds to find all USER_ID in the group

Discord Python Allow one user to identify another within command

I'm working on a bot for discord that tracks information related to a game. I would like staff members to alter the data of regular players with a bot command. Is there a way to grab the mention out of the command?
&do_thing #target specifics
I'm familiar with extracting the nickname and discord ID for the author. I need to get that info for the target.
Any help appreciated.
If you mean pinging/mentioning another discord user with the message, then you should check out this previously asked question.
The basic gist is that you can use message.mentions[0].id to get the first tagged user in the message.
Please make sure to check the forum for previously asked similar questions before you ask your own, in order to avoid asking repetitive questions.

Python google search and get immediate answer

I am trying to make a voice assistant with python. I need to know how to find the immediate answer to a question that comes up in bold when you look it up on google. For instance http://www.google.co.uk/search?q=what+is+the+capital+of+ethiopia is Addis Ababa. Any help would be greatly appreciated.
If you mean how to immediately get redirected to the "I'm feeling lucky", then append this to the query string: btnI=1. Or, as a complete URL based on your example:
https://www.google.co.uk/search?q=what+is+the+capital+of+ethiopia&btnI=1

soundcloud api python user information

Issues using SoundCloud API with python to get user info
I've downloaded the soundcloud library and followed the tutorials, and saw on the soundcloud dev page that user syntax is, for example /users/{id}/favorites.
I just don't know how to use python to query user information. Specifically, i would like to print a list of tracks that a given user liked, (or favorited, but liked would be better).
any help would be greatly appreciated. thanks!
Generally, It's better to mention what you have tried and show some code. It makes it easier for people to help you on Stack Overflow. Regardless maybe looking at SoundCloud's Python wrapper will help you.
You can also do the following :
import soundcloud
token= 'user_access_token'
client = soundcloud.Client(access_token=token)
user_info = client.get('/me')
user_favorites = client.get('/me/favorites')
user_tracks = client.get('/me/tracks')
and so on...
I figured it out, pretty simple just didn't know the exact syntax.
users = client.get('/users', g ='keyword')

Categories

Resources