forked from DuncteBot/SkyBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testscript.groovy
33 lines (29 loc) · 1.42 KB
/
testscript.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Skybot, a multipurpose discord bot
* Copyright (C) 2017 - 2018 Duncan "duncte123" Sterken & Ramid "ramidzkh" Khan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import me.duncte123.botcommons.messaging.EmbedUtils
static def quick_mafs(int x) {
def the_thing = x + 2 -1
return the_thing
}
//channel.sendFile(new URL("https://i.redd.it/byolwd5dnaqz.jpg").openStream(), "filename.png", new MessageBuilder()
//.setEmbed(EmbedUtils.defaultEmbed().setImage("attachment://filename.png").build()).build()).queue()
channel.sendMessage("This has an embed with an image!")
.addFile(new URL("https://i.redd.it/byolwd5dnaqz.jpg").openStream(), "alpaca.png")
.embed(EmbedUtils.embedImage("attachment://alpaca.png"))
.queue()
return quick_mafs(2) + "\nThe thing goes skrra"