Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SimpleSkype

Modular, plugin based Skype bot utilizing Skype4Sharp (reuploaded)

By reading this project's source code, compiling as a binary, redistributing assets found in this repository, etc, or ANY form of use, you must agree to the license enlisted below.

As this project uses [Skype4Sharp] (https://github.com/lin-e/Skype4Sharp/), which itself has some documentation, please visit there for additional usage information. The documentation provided here is solely for the bot itself.

Directory Structure

.
`-- SimpleSkype
|-- SimpleSkype.exe
|-- Skype4Sharp.dll
|-- Newtonsoft.Json.dll
|-- PluginInterface.dll
|-- plugins
| |-- source
| | |-- foobar.cs
| | `-- example.cs
| |-- foobar.dll
| `-- example.dll
`-- ranks
|-- owners.txt
|-- banned.txt
|-- admins.txt
|-- moderators.txt
|-- ultimates.txt
`-- premiums.txt

Making a Plugin

Example

Note, I will use '#' to note an actual comment, since // is used in the compiler.

Also, this plugin makes no sense, it's just to show what's possible.

//ref System.Web.dll # This adds a reference to an external assembly, which is not included by default in the compiler.usingSystem;usingPluginInterface;usingSkype4Sharp;usingSystem.Web;usingSimpleSkype;namespacepluginBuild{publicclassyour_plugin:Plugin{publicstringName{get{return"Foo";}}publicstringDescription{get{return"Great plugin!";}}publicstringAuthor{get{return"YourNameHere";}}publicstring[]Triggers{get{returnnewstring[]{"foo","bar"};}}publicstringSyntax{get{return"<message>";}}publicUserRankRequiredRank{get{returnUserRank.Premium;}}publicstringInvalidRankMessage{get{return"Please buy premium to get access to this command!";}}publicvoidRun(ChatMessagerMessage,ChatMessagepMessage,string[]commandArgs){if(commandArgs.Length>1){SimpleSkype.Program.botName=HttpUtility.UrlEncode(pMessage.Body.Remove(0,commandArgs[0].Length+1));//# This literally makes no sense. 'botName' isn't even a variable.rMessage.Body="You've changed the bot's name! I guess.";}else{thrownewInvalidSyntaxException();}}}}

User Ranks

Presented in order of 'power'

UserRank.OwnerUserRank.Admin
UserRank.Moderator
UserRank.Ultimate
UserRank.Premium
UserRank.Normal
UserRank.Banned

Adding references to external libraries

Put this at the top of the file (the comments). It's a comment anyways, so the compiler won't do anything with it.

//ref System.Web.dll//ref ChatterBotAPI.dll

Checking syntax

Don't forget that the command trigger itself is also an argument

if(commandArgs.Length==2){rMessage.Body="Well done! You have used syntax correctly.";}else{thrownewInvalidSyntaxException();}

About

Modular, plugin based Skype bot utilizing Skype4Sharp

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages