-
-
Notifications
You must be signed in to change notification settings - Fork 163
Messages
getRecentMessage(ChannelID,num=1,beforeDate=None)
bot.getRecentMessage("383003333751856129") #if beforeDate not given, then most recent message(s) will be returned
sendMessage(ChannelID,message,embed='',tts=False)
bot.sendMessage("383003333751856129","Hello You :)")
- bold message: **text**
- italicized message: *text*
- strikethrough message: ~~text~~
- quoted message: > text
- code: `text`
- spoiler: ||text||
sendFile(channelID,filelocation,isurl=False,message="")
bot.sendFile("383003333751856129","https://thiscatdoesnotexist.com/",True)
- spoiler images: rename image to SPOILER_imagename.jpg (or whatever extension it has)
sendMessage(ChannelID,message,embed='',tts=False)
embed = discum.Embedder()
embed.Title("This is a test")
embed.image('https://cdn.dribbble.com/users/189524/screenshots/2105870/04-example_800x600_v4.gif')
embed.fields('Hello!',':yum:')
embed.fields(':smile:','Testing :)')
embed.author('Tester')
bot.sendMessage("383006063751856129","",embed.read())
(if only guildID is provided, this will return most recent messages in that guild). format 25 grouped results per page, ~4 messages in each group, target messages have key "hit" in them). If you'd like to filter searchMessages to only return the messages you searched for, use filterSearchResults
searchMessages(guildID,channelID=None,userID=None,mentionsUserID=None,has=None,beforeDate=None,afterDate=None,textSearch=None,afterNumResults=None)
bot.searchMessages("267624335836053506",textSearch="hello")
- input types for the search feature:
- channelID,userID,mentionsUserID are lists of either ints or strings
- has is a list of strings
- beforeDate and afterDate are ints
- textSearch is a string
- afterNumResults is an int (multiples of 25)
filterSearchResults(searchResponse)
searchResponse = bot.searchMessages("267624335836053506",textSearch="hello")
bot.filterSearchResults(searchResponse)
typingAction(channelID)
bot.typingAction("267624335836053506")
deleteMessage(channelID,messageID)
bot.deleteMessage("267624335836053506","711254483669352469")
pinMessage(channelID,messageID)
bot.pinMessage("267624335836053506","711254483669352469")
unPinMessage(channelID,messageID)
bot.unPinMessage("267624335836053506","711254483669352469")
getPins(channelID)
bot.getPins("267624335836053506")