Skip to content

Commit

Permalink
Added Discord to Pastebin integration
Browse files Browse the repository at this point in the history
  • Loading branch information
G33kDude committed Jan 4, 2018
1 parent def6675 commit e0599f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/CQT.Paste.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class Paste
{
static Targets := {"IRC": "#ahk", "Discord": "discord"}

__New(Parent)
{
this.Parent := Parent
Expand All @@ -22,7 +24,7 @@ class Paste
Gui, Add, Edit, x+5 yp w100 h22 hWndhPasteName, % this.Parent.Settings.DefaultName
this.hPasteName := hPasteName

Gui, Add, ComboBox, x+5 yp w75 hWndhPasteChan, Announce||#ahk|#ahkscript
Gui, Add, DropDownList, x+5 yp w75 hWndhPasteChan, Announce||IRC|Discord
this.hPasteChan := hPasteChan

PostMessage, 0x153, -1, 22-6,, ahk_id %hPasteChan% ; Set height of ComboBox
Expand Down Expand Up @@ -50,7 +52,7 @@ class Paste
GuiControlGet, PasteChan,, % this.hPasteChan
this.GuiClose()

Link := Ahkbin(this.Parent.RichCode.Value, PasteName, PasteDesc, PasteChan)
Link := Ahkbin(this.Parent.RichCode.Value, PasteName, PasteDesc, this.Targets[PasteChan])

MsgBox, 292, % this.Parent.Title " - Pasted", Link received:`n%Link%`n`nCopy to clipboard?
IfMsgBox, Yes
Expand Down

0 comments on commit e0599f9

Please sign in to comment.