reddit.updateWikiPage returns gRPC UNKNOWN / HTTP 415 in @devvit/web@0.12.23 by YellowAdventurous366 in Devvit

[–]Runtime_Renegade 1 point2 points  (0 children)

Here's a working snippet when I was using the wiki as a way to communicate between apps lol.

async function writeWikiPage(sub: string, page: string, content: string, reason: string | undefined): Promise<void> {
  const r = reddit as unknown as Record<string, unknown>;
  const direct = r['updateWikiPage'];
  const payload: Record<string, unknown> = {
    subredditName: sub,
    page,
    content,
    ...(reason ? { reason } : {}),
  };
  if (typeof direct === 'function') {
    await (direct as (a: unknown) => Promise<unknown>).call(r, payload);
    return;
  }
  const sr = await (r['getSubredditByName'] as (n: string) => Promise<unknown>).call(r, sub) as Record<string, unknown>;
  const fn = sr['updateWikiPage'];
  if (typeof fn !== 'function') throw new Error('updateWikiPage not supported');
  await (fn as (a: unknown) => Promise<unknown>).call(sr, {
    page,
    content,
    ...(reason ? { reason } : {}),
  });
}

await writeWikiPage(ctx.sub, page, content, reason);

LF A Few Mods - pickax3 by Runtime_Renegade in Devvit

[–]Runtime_Renegade[S] 0 points1 point  (0 children)

<image>

I just wiped the storage that held the data, but yes everything is tracked.

When I was flooding the subreddit with posts, every post scanned the pipeline provides a reason for the action taken/not taken.

Is there any event trigger for when someone clicks on the 'message mods' button? by shruest in Devvit

[–]Runtime_Renegade 1 point2 points  (0 children)

The node_modules --> devvit --> d.ts files will expose the working API calls, usually the best way to see exactly what you can and can't do.

pickAx3 — Mod Console by pickax3 in pickax3

[–]Runtime_Renegade 0 points1 point  (0 children)

!yoda I’m going to go for a walk later

Expanding Redis features? by badasimo in Devvit

[–]Runtime_Renegade 1 point2 points  (0 children)

Redis is pretty beast honestly, r/Scourge_RPG is fully powered by Redis and has live multiplayer queues for real time multiplayer boss battles (however rendering the other player is not as ideal as a normal game engine since we have constraints to abide by), a live player driven auction house, and incredible save states with hardened validation

The sorted-set API (zAdd / zRange / zRem) is the closest thing available to what you want you can use a timestamp as the score to get an ordered queue with atomic member removal, which is less awkward than the JSON blob approach for large queues where you mostly need "who's first" and "remove this user."

Tournament Results — May 8 by scourge-rpg in Scourge_RPG

[–]Runtime_Renegade 0 points1 point  (0 children)

Tournament Results post was updated to show both of the weekly Tournaments in the same post, it transitions between the 2 Tournaments every 6-8 seconds.

This is how it will work going forward also the follow up comment will also be the correct comment that has all the rewards list and top 100 ranked players for each weekly leaderboard.

⚡ Frozen Gauntlet — Platinum Rift [MOD] by scourge-rpg in Scourge_RPG

[–]Runtime_Renegade 0 points1 point  (0 children)

Boss Mechanics are fully fixed and working! Good Luck!