mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-28 12:36:35 +00:00
Post to Insta when tweeting
This commit is contained in:
parent
44d3f13273
commit
06584bd593
2 changed files with 4 additions and 2 deletions
|
|
@ -125,7 +125,8 @@ async function main() {
|
|||
case "tweet": {
|
||||
console.log("tweet");
|
||||
const hash = argv._[1];
|
||||
await tweet(client, hash);
|
||||
const md5 = await tweet(client, hash);
|
||||
await insta(client, md5);
|
||||
break;
|
||||
}
|
||||
case "insta": {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import UserContext from "../data/UserContext";
|
|||
import TweetModel from "../data/TweetModel";
|
||||
const temp = _temp.track();
|
||||
|
||||
export async function tweet(discordClient: Client, anything: string | null) {
|
||||
export async function tweet(discordClient: Client, anything: string | null): Promise<string> {
|
||||
const ctx = new UserContext();
|
||||
const tweetBotChannel = await discordClient.channels.fetch(
|
||||
TWEET_BOT_CHANNEL_ID
|
||||
|
|
@ -86,6 +86,7 @@ export async function tweet(discordClient: Client, anything: string | null) {
|
|||
);
|
||||
}
|
||||
logger.info("Tweeted a skin", { md5, filename, tweetId });
|
||||
return md5;
|
||||
}
|
||||
|
||||
async function getResizedScreenshot(md5: string): Promise<Buffer> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue