MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / createInteraction

Function createInteraction

tests/failure-paths/errorHandler.failure.test.js:36–52  ·  view source on GitHub ↗
(overrides = {})

Source from the content-addressed store, hash-verified

34}
35
36function createInteraction(overrides = {}) {
37 return {
38 id: 'interaction-1',
39 createdTimestamp: Date.now(),
40 deferred: false,
41 replied: false,
42 guildId: 'guild-1',
43 channelId: 'channel-1',
44 commandName: 'ping',
45 type: 2,
46 customId: null,
47 user: { id: 'user-1' },
48 async reply() {},
49 async editReply() {},
50 ...overrides
51 };
52}
53
54test('expired interaction path logs INTERACTION_EXPIRED and skips reply', async () => {
55 const capture = createLoggerCapture();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected