xackery / talkeq Goto Github PK
View Code? Open in Web Editor NEWEverquest (eqlog, telnet) <-> Chat (discord)
License: Apache License 2.0
Everquest (eqlog, telnet) <-> Chat (discord)
License: Apache License 2.0
SELECT username, forum_name, topic_title, post_text FROM phpbb_posts p INNER JOIN phpbb_users u ON p.poster_id = u.user_id INNER JOIN phpbb_topics t ON t.topic_id = p.topic_id INNER JOIN phpbb_forums f ON p.forum_id = f.forum_id WHERE post_id > 1;
//telnet_msg.go
// replace the relevant line with
out += fmt.Sprintf("[%s](%s%d)", itemName, t.config.ItemURL, itemID)
// discord.go
// add to import block ...
"net/http"
"encoding/json"
//done import block ...
// Send sends a message to discord
func (t *Discord) Send(req request.DiscordSend) error {
if !t.config.IsEnabled {
return fmt.Errorf("not enabled")
}
if !t.isConnected {
return fmt.Errorf("not connected")
}
webhookUrl := //<YOUR WEBHOOK URL>
payload := DiscordWebhook{
Content: req.Message,
}
jsonPayload, err := json.Marshal(payload)
if err != nil {
return fmt.Errorf("Failed to parse payload to JSON: %w", err)
}
resp, err := http.Post(webhookUrl, "application/json", bytes.NewBuffer(jsonPayload))
if err != nil {
return fmt.Errorf("Failed to send POST request: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("Received non-200 response: %d", resp.StatusCode)
}
return nil
}
My Go knowledge is absolute garbage and I have no idea how to integrate this correctly into your overall structure (my fork is getting more and more off the rails and is not-good-but-works-for-my-needs), so not gonna PR it. This does work, though. Maybe useful to you or someone else.
I'm going to try to work in reverse link handling (convert allaclone links to ingame links), and would love to contribute all of this but would need some handholding on getting it together correctly.
Currently if you send a multi-line messages (like a list) in discord, it only sends the first line to the game. Any chance of allowing multi line messages to be send to the game? May require multiple messages send (1 per line)?
At each month change the peq editor starts writing to a new log file. It doesnt seem that TalkEQ picks up this change and requires a restart every month. Possible to get this fixed?
Added logging support cycling
it'll fail otherwise, and fix 127.0.01
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.